diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-12-19 17:14:32 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-12-19 17:19:11 +0100 |
commit | 080933dd351272bd2d772d32df7315a536b0cea5 (patch) | |
tree | a76c84272d40feecc6e8fb3a9e50facf56943fb3 | |
parent | 723596443ab3bee92475e8f20ea8451b1736c20c (diff) | |
download | server-080933dd351272bd2d772d32df7315a536b0cea5.tar.gz |
Set cookie path to root directory.
-rw-r--r-- | server.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |