Skip to content

Commit

Permalink
Merge pull request #11 from Mxmilu666/master
Browse files Browse the repository at this point in the history
fix: path 导致的 dashboard 无法获取 cookie
  • Loading branch information
SALTWOOD committed Aug 30, 2024
2 parents abd4b36 + 2a3d926 commit 3e2ccd5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ export class Server {

res.cookie('token', token, {
expires: new Date(Date.now() + 86400000), // 24小时后过期
secure: true,
path: '/93AtHome'
});

if (this.db.getEntity<UserEntity>(UserEntity, user.id)?.isSuperUser) {
Expand All @@ -240,8 +238,6 @@ export class Server {
}, "admin", 60 * 60 * 24);
res.cookie('adminToken', adminToken, {
expires: new Date(Date.now() + 86400000), // 24小时后过期
secure: true,
path: '/93AtHome/super'
});
}

Expand Down Expand Up @@ -864,4 +860,4 @@ export class Server {
})
});
}
}
}

0 comments on commit 3e2ccd5

Please sign in to comment.