Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit da68a1f

Browse files
cultofmetatronPatrickJS
authored andcommitted
chore(webpack): added cors headers to devpack (#148)
since --cors no longer works, I added the following here so that we can still have cors
1 parent 12b167d commit da68a1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

webpack.config.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ var defaultConfig = {
6060

6161
devServer: {
6262
historyApiFallback: true,
63-
watchOptions: { aggregateTimeout: 300, poll: 1000 }
63+
watchOptions: { aggregateTimeout: 300, poll: 1000 },
64+
headers: {
65+
"Access-Control-Allow-Origin": "*",
66+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
67+
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
68+
}
6469
},
6570

6671
node: {

0 commit comments

Comments
 (0)