fix: define new cookie in EchoAuthCookie but use the existing cookies values

This commit is contained in:
Derrick Hammer 2024-03-19 05:02:48 -04:00
parent b2b6102216
commit 4391e9fc31
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 1 deletions

View File

@ -143,7 +143,15 @@ func EchoAuthCookie(jc jape.Context, apiName string) {
continue
}
http.SetCookie(jc.ResponseWriter, cookies[0])
http.SetCookie(jc.ResponseWriter, &http.Cookie{
Name: cookies[0].Name,
Value: cookies[0].Value,
Expires: cookies[0].Expires,
Secure: true,
HttpOnly: true,
Path: "/",
Domain: cookies[0].Domain,
})
}
}