mirror of
https://github.com/astaxie/beego.git
synced 2024-11-05 02:50:56 +00:00
read config from app.conf for session
This commit is contained in:
parent
98f3fecc03
commit
c68505e451
@ -233,6 +233,8 @@ func ParseConfig() (err error) {
|
|||||||
BConfig.WebConfig.Session.SessionProviderConfig = AppConfig.DefaultString("SessionProviderConfig", BConfig.WebConfig.Session.SessionProviderConfig)
|
BConfig.WebConfig.Session.SessionProviderConfig = AppConfig.DefaultString("SessionProviderConfig", BConfig.WebConfig.Session.SessionProviderConfig)
|
||||||
BConfig.WebConfig.Session.SessionGCMaxLifetime = AppConfig.DefaultInt64("SessionGCMaxLifetime", BConfig.WebConfig.Session.SessionGCMaxLifetime)
|
BConfig.WebConfig.Session.SessionGCMaxLifetime = AppConfig.DefaultInt64("SessionGCMaxLifetime", BConfig.WebConfig.Session.SessionGCMaxLifetime)
|
||||||
BConfig.WebConfig.Session.SessionCookieLifeTime = AppConfig.DefaultInt("SessionCookieLifeTime", BConfig.WebConfig.Session.SessionCookieLifeTime)
|
BConfig.WebConfig.Session.SessionCookieLifeTime = AppConfig.DefaultInt("SessionCookieLifeTime", BConfig.WebConfig.Session.SessionCookieLifeTime)
|
||||||
|
BConfig.WebConfig.Session.SessionAutoSetCookie = AppConfig.DefaultBool("SessionAutoSetCookie", BConfig.WebConfig.Session.SessionAutoSetCookie)
|
||||||
|
BConfig.WebConfig.Session.SessionDomain = AppConfig.DefaultString("SessionDomain", BConfig.WebConfig.Session.SessionDomain)
|
||||||
|
|
||||||
if sd := AppConfig.String("StaticDir"); sd != "" {
|
if sd := AppConfig.String("StaticDir"); sd != "" {
|
||||||
for k := range BConfig.WebConfig.StaticDir {
|
for k := range BConfig.WebConfig.StaticDir {
|
||||||
|
Loading…
Reference in New Issue
Block a user