mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00
allow using auth without https
This commit is contained in:
parent
8eef7db1c6
commit
0c112e1db1
2 changed files with 2 additions and 3 deletions
|
@ -162,7 +162,7 @@ func (auth *OIDCProvider) RedirectLoginPage(w http.ResponseWriter, r *http.Reque
|
|||
MaxAge: 300,
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
Secure: true,
|
||||
Secure: r.TLS != nil,
|
||||
Path: "/",
|
||||
})
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ func setTokenCookie(w http.ResponseWriter, r *http.Request, name, value string,
|
|||
MaxAge: int(ttl.Seconds()),
|
||||
Domain: cookieFQDN(r),
|
||||
HttpOnly: true,
|
||||
Secure: true,
|
||||
Secure: r.TLS != nil,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
Path: "/",
|
||||
})
|
||||
|
@ -56,7 +56,6 @@ func clearTokenCookie(w http.ResponseWriter, r *http.Request, name string) {
|
|||
MaxAge: -1,
|
||||
Domain: cookieFQDN(r),
|
||||
HttpOnly: true,
|
||||
Secure: true,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
Path: "/",
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue