Skip to content

Commit afd6a1c

Browse files
committed
🐛 Fix cors in private network
1 parent f55a613 commit afd6a1c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/commands/devCommand.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ export function devCommand({
8888
}
8989
}
9090
webpackConfig.server.headers = {
91-
"Access-Control-Allow-Origin": "*",
92-
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
93-
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization",
91+
"Access-Control-Allow-Headers": "Authorization, Content-Type, X-Requested-With",
92+
"Access-Control-Allow-Private-Network": "true",
93+
}
94+
webpackConfig.server.cors = {
95+
credentials: true,
96+
origin: true,
9497
}
9598

9699
if (cert && key) {

0 commit comments

Comments
 (0)