Skip to content

Commit

Permalink
Add new acceptable header on Access-Control-Allow-Headers to allow …
Browse files Browse the repository at this point in the history
…livechat rest api requests when CORS is enabled. (#12561)
  • Loading branch information
renatobecker authored and rodrigok committed Nov 16, 2018
1 parent 0b443b9 commit 01f919a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-api/server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const defaultOptionsEndpoint = function _defaultOptionsEndpoint() {
if (RocketChat.settings.get('API_Enable_CORS') === true) {
this.response.writeHead(200, {
'Access-Control-Allow-Origin': RocketChat.settings.get('API_CORS_Origin'),
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, X-User-Id, X-Auth-Token, x-visitor-token',
});
} else {
this.response.writeHead(405);
Expand Down

0 comments on commit 01f919a

Please sign in to comment.