forked from p85947160/gitea
* Add secure/httpOnly attributes to the lang cookie (#9690) (#14279) * apply to InitLocales() too Co-authored-by: Timo Gurr <timo.gurr@gmail.com>
This commit is contained in:
parent
4be59eb5d9
commit
fb656b5124
|
@ -110,13 +110,15 @@ func InitLocales() {
|
|||
}
|
||||
}
|
||||
i18n.I18n(i18n.Options{
|
||||
SubURL: setting.AppSubURL,
|
||||
Files: localFiles,
|
||||
Langs: setting.Langs,
|
||||
Names: setting.Names,
|
||||
DefaultLang: "en-US",
|
||||
Redirect: false,
|
||||
CookieDomain: setting.SessionConfig.Domain,
|
||||
SubURL: setting.AppSubURL,
|
||||
Files: localFiles,
|
||||
Langs: setting.Langs,
|
||||
Names: setting.Names,
|
||||
DefaultLang: "en-US",
|
||||
Redirect: false,
|
||||
CookieHttpOnly: true,
|
||||
Secure: setting.SessionConfig.Secure,
|
||||
CookieDomain: setting.SessionConfig.Domain,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -247,13 +247,15 @@ func NewMacaron() *macaron.Macaron {
|
|||
}
|
||||
|
||||
m.Use(i18n.I18n(i18n.Options{
|
||||
SubURL: setting.AppSubURL,
|
||||
Files: localFiles,
|
||||
Langs: setting.Langs,
|
||||
Names: setting.Names,
|
||||
DefaultLang: "en-US",
|
||||
Redirect: false,
|
||||
CookieDomain: setting.SessionConfig.Domain,
|
||||
SubURL: setting.AppSubURL,
|
||||
Files: localFiles,
|
||||
Langs: setting.Langs,
|
||||
Names: setting.Names,
|
||||
DefaultLang: "en-US",
|
||||
Redirect: false,
|
||||
CookieHttpOnly: true,
|
||||
Secure: setting.SessionConfig.Secure,
|
||||
CookieDomain: setting.SessionConfig.Domain,
|
||||
}))
|
||||
m.Use(cache.Cacher(cache.Options{
|
||||
Adapter: setting.CacheService.Adapter,
|
||||
|
|
Loading…
Reference in New Issue