summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-12-19 17:14:32 +0100
committerTor Andersson <tor@ccxvii.net>2021-12-19 17:19:11 +0100
commit080933dd351272bd2d772d32df7315a536b0cea5 (patch)
treea76c84272d40feecc6e8fb3a9e50facf56943fb3 /server.js
parent723596443ab3bee92475e8f20ea8451b1736c20c (diff)
downloadserver-080933dd351272bd2d772d32df7315a536b0cea5.tar.gz
Set cookie path to root directory.
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.js b/server.js
index 2667ad1..8d4c24b 100644
--- a/server.js
+++ b/server.js
@@ -62,12 +62,12 @@ function login_cookie(req) {
function login_insert(res, user_id) {
let sid = login_sql_insert.get(user_id);
- res.setHeader('Set-Cookie', 'login=' + sid + '; Max-Age=2419200');
+ res.setHeader('Set-Cookie', 'login=' + sid + '; Path=/; Max-Age=2419200');
}
function login_touch(res, sid) {
if (login_sql_touch.run(sid).changes === 1)
- res.setHeader('Set-Cookie', 'login=' + sid + '; Max-Age=2419200');
+ res.setHeader('Set-Cookie', 'login=' + sid + '; Path=/; Max-Age=2419200');
}
function login_delete(res, sid) {