Fix Safari cookies and CSRF.
This commit is contained in:
parent
885a6ad7bf
commit
2a546dfe3d
1 changed files with 0 additions and 2 deletions
|
|
@ -30,7 +30,6 @@ func BuildRouter(c *services.Container) error {
|
||||||
// Create a cookie store for session data.
|
// Create a cookie store for session data.
|
||||||
cookieStore := sessions.NewCookieStore([]byte(c.Config.App.EncryptionKey))
|
cookieStore := sessions.NewCookieStore([]byte(c.Config.App.EncryptionKey))
|
||||||
cookieStore.Options.HttpOnly = true
|
cookieStore.Options.HttpOnly = true
|
||||||
cookieStore.Options.Secure = true
|
|
||||||
cookieStore.Options.SameSite = http.SameSiteStrictMode
|
cookieStore.Options.SameSite = http.SameSiteStrictMode
|
||||||
|
|
||||||
g.Use(
|
g.Use(
|
||||||
|
|
@ -52,7 +51,6 @@ func BuildRouter(c *services.Container) error {
|
||||||
echomw.CSRFWithConfig(echomw.CSRFConfig{
|
echomw.CSRFWithConfig(echomw.CSRFConfig{
|
||||||
TokenLookup: "form:csrf",
|
TokenLookup: "form:csrf",
|
||||||
CookieHTTPOnly: true,
|
CookieHTTPOnly: true,
|
||||||
CookieSecure: true,
|
|
||||||
CookieSameSite: http.SameSiteStrictMode,
|
CookieSameSite: http.SameSiteStrictMode,
|
||||||
ContextKey: context.CSRFKey,
|
ContextKey: context.CSRFKey,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue