We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd16241 commit a29bce2Copy full SHA for a29bce2
routes/users.js
@@ -47,7 +47,10 @@ router.get("/", async (ctx) => {
47
loginedUsers.add(user.login);
48
}
49
if (db.find((q) => q.login === user.login)) {
50
- ctx.cookies.set("token", encrypt(JSON.stringify(user)));
+ ctx.cookies.set("token", encrypt(JSON.stringify(user)), {
51
+ httpOnly: false,
52
+ expires: 24 * 60 * 60 * 1000 + Date.now(),
53
+ });
54
ctx.body = {
55
...user,
56
pay: true,
0 commit comments