Skip to content

Commit ba1c7e8

Browse files
author
Florian Glock
committed
added samesite option for cookies
1 parent 9598abb commit ba1c7e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func NewClient(options *Options) *Client {
7575
MaxAge: 86400,
7676
HttpOnly: false,
7777
Secure: false,
78+
SameSite: http.SameSiteDefaultMode,
7879
}
7980
}
8081

@@ -306,6 +307,7 @@ func (c *Client) getCookie(w http.ResponseWriter, r *http.Request) *http.Cookie
306307
MaxAge: c.cookie.MaxAge,
307308
HttpOnly: c.cookie.HttpOnly,
308309
Secure: c.cookie.Secure,
310+
SameSite: c.cookie.SameSite,
309311
}
310312

311313
if glog.V(2) {

0 commit comments

Comments
 (0)