forked from forgejo/forgejo
Make cookies HttpOnly and obey COOKIE_SECURE flag (#4706)
This commit is contained in:
parent
ca112f0a04
commit
0449330dbc
4 changed files with 26 additions and 25 deletions
|
@ -103,7 +103,7 @@ func ProfilePost(ctx *context.Context, form auth.UpdateProfileForm) {
|
|||
}
|
||||
|
||||
// Update the language to the one we just set
|
||||
ctx.SetCookie("lang", ctx.User.Language, nil, setting.AppSubURL)
|
||||
ctx.SetCookie("lang", ctx.User.Language, nil, setting.AppSubURL, "", setting.SessionConfig.Secure, true)
|
||||
|
||||
log.Trace("User settings updated: %s", ctx.User.Name)
|
||||
ctx.Flash.Success(i18n.Tr(ctx.User.Language, "settings.update_profile_success"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue