Skip to content

Commit

Permalink
feat: change cookie path and session key
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Jul 27, 2024
1 parent e605260 commit d97e4ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default (appInfo: EggAppInfo) => {
};

config.session = {
key: 'OJ3_SESS',
path: '/onlinejudge3/',
renew: true,
genid: (ctx: Context) => {
return `session:${ctx.userId || 0}:${uuidv4()}`;
Expand Down
2 changes: 2 additions & 0 deletions src/sub-app/socket-io/src/config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export default (appInfo: EggAppInfo) => {
config.emitAuthKey = '';

config.session = {
key: 'OJ3_SESS',
path: '/onlinejudge3/',
renew: true,
genid: (ctx: Context) => {
return `session:${ctx.userId || 0}:${uuidv4()}`;
Expand Down

0 comments on commit d97e4ce

Please sign in to comment.