Skip to content

Commit

Permalink
Merge pull request #357 from halilim/patch-1
Browse files Browse the repository at this point in the history
Add Access-Control-Allow-Headers header to proxy
  • Loading branch information
mobz authored Sep 8, 2017
2 parents dc0b1f6 + 6d79d77 commit af42e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const http = require("http");

const CORS_SETTINGS = {
origin: "http://localhost:9100",
methods: "GET PUT POST DELETE OPTIONS HEAD"
methods: "GET PUT POST DELETE OPTIONS HEAD",
headers: "Authorization, Content-Type"
}


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

res.setHeader("Access-Control-Allow-Origin", CORS_SETTINGS.origin );
res.setHeader("Access-Control-Allow-Methods", CORS_SETTINGS.methods );
res.setHeader("Access-Control-Allow-Headers", CORS_SETTINGS.headers );

if (req.method === 'OPTIONS') {
res.writeHead(200);
Expand Down

0 comments on commit af42e97

Please sign in to comment.