Skip to content

Commit

Permalink
feat: change csrf cookie path and default socket.io path
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Jul 27, 2024
1 parent d97e4ce commit 4c37a93
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
41 changes: 27 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"egg-alinode": "^2.0.1",
"egg-redis": "^2.4.0",
"egg-scripts": "^2.10.0",
"egg-security": "^2.11.0",
"egg-sequelize": "^5.2.1",
"egg-session-redis": "^2.1.0",
"egg-socket.io": "^4.1.6",
Expand Down
3 changes: 3 additions & 0 deletions src/config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export default (appInfo: EggAppInfo) => {
config.security = {
csrf: {
enable: false,
cookieOptions: {
path: '/onlinejudge3/',
},
},
};

Expand Down
1 change: 1 addition & 0 deletions src/sub-app/socket-io/src/config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default (appInfo: EggAppInfo) => {
};

config.io = {
path: '/onlinejudge3/socket.io',
init: {},
namespace: {
'/': {
Expand Down

0 comments on commit 4c37a93

Please sign in to comment.