mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
auth: add an option to enforce the secure attr of the set-cookie
This commit is contained in:
@@ -526,7 +526,7 @@ func (s *Auth[T]) trySetCookie(ctx *context.Context, accessToken string) {
|
||||
Name: cookieName,
|
||||
Value: url.QueryEscape(accessToken),
|
||||
HttpOnly: true,
|
||||
Secure: ctx.IsSSL(),
|
||||
Secure: s.config.Cookie.Secure || ctx.IsSSL(),
|
||||
Domain: ctx.Domain(),
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
Expires: time.Now().Add(maxAge),
|
||||
|
||||
Reference in New Issue
Block a user