mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-20 18:07:59 +02:00
Add expiration to theme cookie
This commit is contained in:
parent
bf97829814
commit
40ae263248
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -29,6 +30,7 @@ func (a *application) handleThemeChangeRequest(w http.ResponseWriter, r *http.Re
|
||||
Value: themeKey,
|
||||
Path: a.Config.Server.BaseURL + "/",
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
Expires: time.Now().Add(2 * 365 * 24 * time.Hour),
|
||||
})
|
||||
|
||||
w.Header().Set("Content-Type", "text/css")
|
||||
|
Loading…
x
Reference in New Issue
Block a user