mirror of https://github.com/jlelse/GoBlog
Fix cookies for auth and captcha
This commit is contained in:
parent
be929058cf
commit
bb73d4831c
|
@ -121,8 +121,8 @@ func createTokenCookie(username string) (*http.Cookie, error) {
|
|||
Name: "token",
|
||||
Value: tokenString,
|
||||
Expires: expiration,
|
||||
Secure: true,
|
||||
Secure: httpsConfigured(),
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -105,8 +105,8 @@ func createCaptchaCookie() (*http.Cookie, error) {
|
|||
Name: "captcha",
|
||||
Value: tokenString,
|
||||
Expires: expiration,
|
||||
Secure: true,
|
||||
Secure: httpsConfigured(),
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue