Make cookies HttpOnly and obey COOKIE_SECURE flag (#4707)

This commit is contained in:
SagePtr
2018-08-14 16:19:20 -04:00
committed by techknowlogick
parent cbe8a1f0e6
commit 052aa54b2b
4 changed files with 26 additions and 25 deletions
+1 -1
View File
@@ -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"))