Skip to content

Commit 1e090a4

Browse files
committed
fix: fix webpack server header for crosssite
1 parent e592b8e commit 1e090a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utils/webpack-dev-server.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ export const runWebpackDevServer = async (opts: IOptions<IExtraOptions>) => {
7373
ignored: /node_modules/,
7474
}),
7575
},
76-
headers: { 'Access-Control-Allow-Origin': '*' },
76+
headers: {
77+
'Access-Control-Allow-Origin': '*',
78+
'Access-Control-Allow-Credentials': 'true',
79+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
80+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization, x-csrf-token',
81+
},
7782
clientLogLevel: 'warn',
7883
disableHostCheck: true,
7984
port: opts.devServerPort,

0 commit comments

Comments
 (0)