forked from fuson/node-jsonrpc2
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
I get this issue in chrome when trying to set the Access-Control-Allow-Headers:
"Request header field x-requested-with is not allowed by Access-Control-Allow-Headers."
This is because on line 126 of server.js you are overriding what is passed in with some defaults:
headers = {
'Content-Length': 0,
'Access-Control-Allow-Headers': 'Accept, X-Requested-With, Authorization, Content-Type'
};
headers = extend(self.opts.headers, headers);
If the user specifies a Access-Control-Allow-Headers should that not overwrite this default, (so the extend be the other way around)?:
headers = extend(headers, self.opts.headers);
Metadata
Metadata
Assignees
Labels
No labels