Skip to content

Commit

Permalink
fix: 使用 path 会导致前端无法获取到登录状态
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Sep 15, 2024
1 parent 5b74756 commit db10f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class Server {
res.cookie('token', token, {
expires: new Date(Date.now() + 86400000), // 24小时后过期
secure: true,
path: '/93AtHome'
sameSite: 'lax',
});

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

Expand Down

0 comments on commit db10f84

Please sign in to comment.