From 675e350da300691a47847e239bef24160d9c6c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Fri, 19 Oct 2018 02:11:12 +0200 Subject: [PATCH] Use Cache-Control immutable and SameSite Lax --- pkg/session/session.go | 2 +- server/serve_files.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/session/session.go b/pkg/session/session.go index c25f6c64..e56c0d0f 100644 --- a/pkg/session/session.go +++ b/pkg/session/session.go @@ -58,7 +58,7 @@ func (s *Session) SetCookie(w http.ResponseWriter, r *http.Request) { } if v := cookie.String(); v != "" { - w.Header().Add("Set-Cookie", v+"; SameSite=Strict") + w.Header().Add("Set-Cookie", v+"; SameSite=Lax") } } diff --git a/server/serve_files.go b/server/serve_files.go index 4f455289..b694e632 100644 --- a/server/serve_files.go +++ b/server/serve_files.go @@ -21,7 +21,7 @@ import ( "github.com/khlieng/dispatch/assets" ) -const longCacheControl = "public, max-age=31536000" +const longCacheControl = "public, max-age=31536000, immutable" const disabledCacheControl = "no-cache, no-store, must-revalidate" type File struct {