diff options
Diffstat (limited to 'pkg/web/cookie/new.go')
| -rw-r--r-- | pkg/web/cookie/new.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/web/cookie/new.go b/pkg/web/cookie/new.go index e1d8477..335b305 100644 --- a/pkg/web/cookie/new.go +++ b/pkg/web/cookie/new.go @@ -8,15 +8,14 @@ import ( ) func New(name, value string, expires time.Time) *http.Cookie { - production := env.Fetch("APP_ENV", "development") == "production" return &http.Cookie{ Name: name, Value: value, // TODO:: digitally sign the value Expires: expires, MaxAge: int(time.Until(expires).Seconds()), Path: "/", - HttpOnly: production, - Secure: production, + HttpOnly: true, + Secure: true, SameSite: http.SameSiteDefaultMode, Domain: env.Fetch("HOST", "localhost"), } |
