Skip to content

Commit af42e97

Browse files
authored
Merge pull request #357 from halilim/patch-1
Add Access-Control-Allow-Headers header to proxy
2 parents dc0b1f6 + 6d79d77 commit af42e97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

proxy/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const http = require("http");
22

33
const CORS_SETTINGS = {
44
origin: "http://localhost:9100",
5-
methods: "GET PUT POST DELETE OPTIONS HEAD"
5+
methods: "GET PUT POST DELETE OPTIONS HEAD",
6+
headers: "Authorization, Content-Type"
67
}
78

89

@@ -26,6 +27,7 @@ clusters.forEach( cluster => {
2627

2728
res.setHeader("Access-Control-Allow-Origin", CORS_SETTINGS.origin );
2829
res.setHeader("Access-Control-Allow-Methods", CORS_SETTINGS.methods );
30+
res.setHeader("Access-Control-Allow-Headers", CORS_SETTINGS.headers );
2931

3032
if (req.method === 'OPTIONS') {
3133
res.writeHead(200);

0 commit comments

Comments
 (0)