Revert cookie flag from strict to lax mode otherwise oauth2 won't work
This commit is contained in:
parent
46932c91a6
commit
c1e1506720
3 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ func New(name, value string, isHTTPS bool, path string) *http.Cookie {
|
||||||
Secure: isHTTPS,
|
Secure: isHTTPS,
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
Expires: time.Now().Add(cookieDuration * 24 * time.Hour),
|
Expires: time.Now().Add(cookieDuration * 24 * time.Hour),
|
||||||
SameSite: http.SameSiteStrictMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ func Expired(name string, isHTTPS bool, path string) *http.Cookie {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
MaxAge: -1,
|
MaxAge: -1,
|
||||||
Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC),
|
Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
SameSite: http.SameSiteStrictMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ type SessionData struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s SessionData) String() string {
|
func (s SessionData) String() string {
|
||||||
return fmt.Sprintf(`CSRF=%q, "OAuth2State=%q, FlashMsg=%q, FlashErrorMsg=%q, Lang=%q, Theme=%q`,
|
return fmt.Sprintf(`CSRF=%q, OAuth2State=%q, FlashMsg=%q, FlashErrMsg=%q, Lang=%q, Theme=%q, PocketTkn=%q`,
|
||||||
s.CSRF, s.OAuth2State, s.FlashMessage, s.FlashErrorMessage, s.Language, s.Theme)
|
s.CSRF, s.OAuth2State, s.FlashMessage, s.FlashErrorMessage, s.Language, s.Theme, s.PocketRequestToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value converts the session data to JSON.
|
// Value converts the session data to JSON.
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (e *Engine) parseAll() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render process a template and write the ouput.
|
// Render process a template.
|
||||||
func (e *Engine) Render(name, language string, data interface{}) []byte {
|
func (e *Engine) Render(name, language string, data interface{}) []byte {
|
||||||
tpl, ok := e.templates[name]
|
tpl, ok := e.templates[name]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in a new issue