Skip to content

Commit 409cf99

Browse files
routers: set csrf-token security depending on COOKIE_SECURE
Signed-off-by: Aleksandr Bulyshchenko <[email protected]>
1 parent be39cca commit 409cf99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/routes/routes.go

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func NewMacaron() *macaron.Macaron {
114114
Secret: setting.SecretKey,
115115
Cookie: setting.CSRFCookieName,
116116
SetCookie: true,
117+
Secure: setting.SessionConfig.Secure,
117118
Header: "X-Csrf-Token",
118119
CookiePath: setting.AppSubURL,
119120
}))

0 commit comments

Comments
 (0)