remove httponly form username cookie

This commit is contained in:
Arthur Lu 2023-05-13 07:38:32 +00:00
parent a70981afb6
commit 0aff37a9c3

View File

@ -49,7 +49,7 @@ app.post("/api/ticket", async (req, res) => {
let expire = new Date(Date.now() + (2*60*60*1000)); let expire = new Date(Date.now() + (2*60*60*1000));
res.cookie("PVEAuthCookie", ticket, {domain: domain, path: "/", httpOnly: true, secure: true, expires: expire}); res.cookie("PVEAuthCookie", ticket, {domain: domain, path: "/", httpOnly: true, secure: true, expires: expire});
res.cookie("CSRFPreventionToken", csrftoken, {domain: domain, path: "/", httpOnly: true, secure: true, expires: expire}); res.cookie("CSRFPreventionToken", csrftoken, {domain: domain, path: "/", httpOnly: true, secure: true, expires: expire});
res.cookie("username", username, {domain: domain, path: "/", httpOnly: true, secure: true, expires: expire}); res.cookie("username", username, {domain: domain, path: "/", secure: true, expires: expire});
res.cookie("auth", 1, {domain: domain, path: "/", secure: true, expires: expire}); res.cookie("auth", 1, {domain: domain, path: "/", secure: true, expires: expire});
res.status(200).send({auth: true}); res.status(200).send({auth: true});
}); });