mirror of https://github.com/casbin/casnode.git
Compare commits
2 Commits
1a6b86460c
...
778f0fcb77
Author | SHA1 | Date |
---|---|---|
Yang Luo | 778f0fcb77 | |
Yang Luo | cd0c2f257c |
|
@ -8,13 +8,14 @@ driverName = mysql
|
|||
dataSourceName = root:123@tcp(localhost:3306)/
|
||||
dbName = casnode
|
||||
domain = "forum.casbin.com"
|
||||
casdoorDbName = casdoor
|
||||
casdoorEndpoint = https://door.casdoor.com
|
||||
; casdoorEndpoint = http://localhost:8000
|
||||
clientId = 014ae4bd048734ca2dea
|
||||
clientSecret = f26a4115725867b7bb7b668c81e1f8f7fae1544d
|
||||
casdoorOrganization = "casbin"
|
||||
casdoorApplication = "app-casnode"
|
||||
casdoorDbName =
|
||||
casdoorStorageEndpoint = "https://cdn.casbin.com/"
|
||||
casdoorEndpoint = http://localhost:8000
|
||||
clientId = 014ae4bd048734ca2dea
|
||||
clientSecret = xxx
|
||||
httpProxy = "127.0.0.1:10808"
|
||||
initScore = 2000
|
||||
enableNestedReply = true
|
||||
|
|
9
main.go
9
main.go
|
@ -19,7 +19,6 @@ import (
|
|||
"github.com/astaxie/beego/plugins/cors"
|
||||
_ "github.com/astaxie/beego/session/redis"
|
||||
"github.com/casbin/casnode/casdoor"
|
||||
"github.com/casbin/casnode/conf"
|
||||
"github.com/casbin/casnode/object"
|
||||
"github.com/casbin/casnode/routers"
|
||||
"github.com/casbin/casnode/service"
|
||||
|
@ -54,14 +53,16 @@ func main() {
|
|||
beego.InsertFilter("*", beego.BeforeRouter, routers.Static)
|
||||
beego.InsertFilter("*", beego.BeforeRouter, routers.AutoSigninFilter)
|
||||
|
||||
if conf.GetConfigString("redisEndpoint") == "" {
|
||||
beego.BConfig.WebConfig.Session.SessionOn = true
|
||||
beego.BConfig.WebConfig.Session.SessionName = "casnode_session_id"
|
||||
if beego.AppConfig.String("redisEndpoint") == "" {
|
||||
beego.BConfig.WebConfig.Session.SessionProvider = "file"
|
||||
beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp"
|
||||
} else {
|
||||
beego.BConfig.WebConfig.Session.SessionProvider = "redis"
|
||||
beego.BConfig.WebConfig.Session.SessionProviderConfig = conf.GetConfigString("redisEndpoint")
|
||||
beego.BConfig.WebConfig.Session.SessionProviderConfig = beego.AppConfig.String("redisEndpoint")
|
||||
}
|
||||
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 30
|
||||
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 3600 * 24 * 365
|
||||
|
||||
beego.Run()
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
// limitations under the License.
|
||||
|
||||
export const AuthConfig = {
|
||||
// serverUrl: "https://door.casbin.com",
|
||||
serverUrl: "http://localhost:7001",
|
||||
serverUrl: "https://door.casdoor.com",
|
||||
// serverUrl: "http://localhost:7001",
|
||||
clientId: "014ae4bd048734ca2dea",
|
||||
organizationName: "casbin",
|
||||
appName: "app-casnode",
|
||||
|
|
Loading…
Reference in New Issue