diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-07 10:55:44 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-07 10:55:44 -0700 |
| commit | 33cbe7654c9e04a9e176c246ae66c7b1e15100cb (patch) | |
| tree | f9c5d530ac1ec72349c279b6019bff2ff34bf6fb /app/controllers/sessions/controller.go | |
| parent | 15c72d0fa5b973cdef599b5d8563606e321efd54 (diff) | |
fix: use same site lax mode to allow setting cooking on redirect
Diffstat (limited to 'app/controllers/sessions/controller.go')
| -rw-r--r-- | app/controllers/sessions/controller.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/sessions/controller.go b/app/controllers/sessions/controller.go index 77a30fd..5681f65 100644 --- a/app/controllers/sessions/controller.go +++ b/app/controllers/sessions/controller.go @@ -139,7 +139,12 @@ func (c *Controller) Create(w http.ResponseWriter, r *http.Request) { return } - cookie.Write(w, web.NewCookie("session", encoded, cookie.WithExpiration(tokens.Expiry))) + cookie.Write(w, web.NewCookie( + "session", + encoded, + cookie.WithExpiration(tokens.Expiry), + cookie.WithSameSite(http.SameSiteLaxMode), + )) http.Redirect(w, r, "/dashboard", http.StatusFound) } |
