adding Authorization to Access-Control-Allow-Headers

This commit is contained in:
Simon Martín
2019-01-10 16:56:07 +01:00
parent ff27e6744e
commit 644b4232ca
6 changed files with 32 additions and 20 deletions
+11 -10
View File
@@ -307,16 +307,17 @@ describe('template_api', function() {
assert.response(server, post_request, {}, function(res) { next(null, res); });
},
function testCORS() {
assert.response(server, {
url: '/api/v1/map/named/acceptance1',
method: 'OPTIONS'
},{
status: 200,
headers: {
'Access-Control-Allow-Headers': 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Content-Type',
'Access-Control-Allow-Origin': '*'
}
}, function() { done(); });
const allowHeaders = 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, Content-Type';
assert.response(server, {
url: '/api/v1/map/named/acceptance1',
method: 'OPTIONS'
},{
status: 200,
headers: {
'Access-Control-Allow-Headers': allowHeaders,
'Access-Control-Allow-Origin': '*'
}
}, function() { done(); });
});
});