update auth cookie settings
This commit is contained in:
@@ -173,11 +173,13 @@ func (wc *WebController) loginForm(td *TemplateData, r *http.Request) (f Form) {
|
||||
f.SubmitSuccess = true
|
||||
f.SubmitMessages = []template.HTML{"Success!"}
|
||||
f.Extra.SetCookie = &http.Cookie{
|
||||
Name: "pd_auth_key",
|
||||
Value: loginResp.APIKey,
|
||||
Path: "/",
|
||||
Expires: time.Now().AddDate(50, 0, 0),
|
||||
Domain: wc.sessionCookieDomain,
|
||||
Name: "pd_auth_key",
|
||||
Value: loginResp.APIKey,
|
||||
Path: "/",
|
||||
Expires: time.Now().AddDate(50, 0, 0),
|
||||
Domain: wc.sessionCookieDomain,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
Secure: true,
|
||||
}
|
||||
f.Extra.RedirectTo = "/user"
|
||||
}
|
||||
|
Reference in New Issue
Block a user