Skip to content

Commit 28d8545

Browse files
fix headers
1 parent 2b7e94b commit 28d8545

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

pnpm-lock.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime-plugins/control-sharing/app1/rspack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ module.exports = {
2323
static: {
2424
directory: path.join(__dirname, 'dist'),
2525
},
26+
headers: {
27+
'Access-Control-Allow-Origin': '*',
28+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
29+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
30+
},
2631
hot: true,
2732
port: 3001,
2833
liveReload: true,

runtime-plugins/control-sharing/app1/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ module.exports = {
2222
directory: path.join(__dirname, 'dist'),
2323
},
2424
port: 3001,
25+
headers: {
26+
'Access-Control-Allow-Origin': '*',
27+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
28+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
29+
},
2530
},
2631
target: 'web',
2732
output: {

runtime-plugins/control-sharing/app2/rspack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ module.exports = {
2323
directory: path.join(__dirname, 'dist'),
2424
},
2525
port: 3002,
26+
headers: {
27+
'Access-Control-Allow-Origin': '*',
28+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
29+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
30+
},
2631
},
2732
target: 'web',
2833
output: {

runtime-plugins/control-sharing/app2/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ module.exports = {
2222
directory: path.join(__dirname, 'dist'),
2323
},
2424
port: 3002,
25+
headers: {
26+
'Access-Control-Allow-Origin': '*',
27+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
28+
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
29+
},
2530
},
2631
target: 'web',
2732
output: {

0 commit comments

Comments
 (0)