Skip to content

Commit

Permalink
Add secure/httpOnly attributes to the lang cookie (go-gitea#9690) (go…
Browse files Browse the repository at this point in the history
  • Loading branch information
tgurr authored and 6543 committed Jan 7, 2021
1 parent 4be59eb commit d2bc459
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions routers/routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d2bc459

Please sign in to comment.