change samesite settings for web

This commit is contained in:
Willy Kloucek
2021-05-05 13:07:12 +02:00
parent a85a37370e
commit 63cea30af3
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
Enhancement: Set SameSite settings to Strict for Web
Changed SameSite settings to Strict for Web to prevent warnings in Firefox
https://github.com/owncloud/ocis/pull/2019

View File

@@ -177,6 +177,7 @@ func (p Web) Static(ttl int) http.HandlerFunc {
w.Header().Set("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate, value")
w.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat))
w.Header().Set("SameSite", "Strict")
static.ServeHTTP(w, r)
}