go: use '__Host' prefix with the csrf cookie
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fb74533a96
commit
172703aab5
@ -122,7 +122,10 @@ func (a *App) SetEchoSettings() {
|
|||||||
|
|
||||||
csrfCookieName := "pcmt_csrf"
|
csrfCookieName := "pcmt_csrf"
|
||||||
if a.setting.HTTPSecure() {
|
if a.setting.HTTPSecure() {
|
||||||
csrfCookieName = "__Secure-" + csrfCookieName
|
// https://www.sjoerdlangkemper.nl/2017/02/09/cookie-prefixes/
|
||||||
|
// https://scotthelme.co.uk/tough-cookies/
|
||||||
|
// https://check-your-website.server-daten.de/prefix-cookies.html
|
||||||
|
csrfCookieName = "__Host-" + csrfCookieName
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Use(middleware.CSRFWithConfig(middleware.CSRFConfig{
|
e.Use(middleware.CSRFWithConfig(middleware.CSRFConfig{
|
||||||
|
Loading…
Reference in New Issue
Block a user