mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 18:14:28 +00:00
* 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
@ -116,6 +116,8 @@ func InitLocales() {
|
|||||||
Names: setting.Names,
|
Names: setting.Names,
|
||||||
DefaultLang: "en-US",
|
DefaultLang: "en-US",
|
||||||
Redirect: false,
|
Redirect: false,
|
||||||
|
CookieHttpOnly: true,
|
||||||
|
Secure: setting.SessionConfig.Secure,
|
||||||
CookieDomain: setting.SessionConfig.Domain,
|
CookieDomain: setting.SessionConfig.Domain,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -253,6 +253,8 @@ func NewMacaron() *macaron.Macaron {
|
|||||||
Names: setting.Names,
|
Names: setting.Names,
|
||||||
DefaultLang: "en-US",
|
DefaultLang: "en-US",
|
||||||
Redirect: false,
|
Redirect: false,
|
||||||
|
CookieHttpOnly: true,
|
||||||
|
Secure: setting.SessionConfig.Secure,
|
||||||
CookieDomain: setting.SessionConfig.Domain,
|
CookieDomain: setting.SessionConfig.Domain,
|
||||||
}))
|
}))
|
||||||
m.Use(cache.Cacher(cache.Options{
|
m.Use(cache.Cacher(cache.Options{
|
||||||
|
Loading…
Reference in New Issue
Block a user