Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 0c79a2d

Browse files
committed
fix(server.js): Specified Access-Control-Allow-Headers correctly
1 parent 9199852 commit 0c79a2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/server.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ app.use((req, res, next) => {
1414
res.header('Access-Control-Allow-Origin', '*')
1515
res.header(
1616
'Access-Control-Allow-Headers',
17-
// 'origin, x-requested-with, content-type, accept'
18-
'*'
17+
// Chrome は OK で、 Firefox と IE11 がダメだったため、
18+
// '*' だと CORS 的に許可されないので、明示的にリクエストヘッダーの key 名を許可しています
19+
'post-header, common-header, header1'
20+
// '*'
1921
)
2022
// https://stackoverflow.com/questions/37897523/axios-get-access-to-response-header-fields
2123
// https://github.com/axios/axios/issues/606

0 commit comments

Comments
 (0)