refactor: change ClearAuthCookie to set expires date to epoch

This commit is contained in:
Derrick Hammer 2024-03-19 10:57:49 -04:00
parent aff371a844
commit d1bbe7c158
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ func ClearAuthCookie(jc jape.Context, apiName string) {
http.SetCookie(jc.ResponseWriter, &http.Cookie{ http.SetCookie(jc.ResponseWriter, &http.Cookie{
Name: routeableApi.AuthTokenName(), Name: routeableApi.AuthTokenName(),
Value: "", Value: "",
Expires: time.Now().Add(-1 * time.Hour), Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC),
Secure: true, Secure: true,
HttpOnly: true, HttpOnly: true,
Path: "/", Path: "/",