Rename headers for metrics
This commit is contained in:
parent
98325495ea
commit
59cb6f9c9c
@ -7,9 +7,9 @@ module.exports = function cors () {
|
||||
'X-Prototype-Version',
|
||||
'X-CSRF-Token',
|
||||
'Authorization',
|
||||
'Carto-Source-Lib',
|
||||
'Carto-Source-Context',
|
||||
'Carto-Source-Context-Id'
|
||||
'Carto-Event',
|
||||
'Carto-Event-Source',
|
||||
'Carto-Event-Group-Id'
|
||||
];
|
||||
|
||||
if (req.method === 'OPTIONS') {
|
||||
|
@ -43,7 +43,7 @@ describe('attributes', function () {
|
||||
assert.strictEqual(
|
||||
res.headers['access-control-allow-headers'],
|
||||
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id'
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id'
|
||||
);
|
||||
assert.strictEqual(res.headers['access-control-allow-origin'], '*');
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ describe('multilayer', function () {
|
||||
assert.strictEqual(
|
||||
res.headers['access-control-allow-headers'],
|
||||
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id'
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id'
|
||||
);
|
||||
assert.strictEqual(res.headers['access-control-allow-origin'], '*');
|
||||
}
|
||||
@ -1034,7 +1034,7 @@ describe('multilayer', function () {
|
||||
|
||||
it('geting options on layergroup should return CORS headers', function (done) {
|
||||
const allowHeaders = 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id, Content-Type';
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id, Content-Type';
|
||||
assert.response(server, {
|
||||
url: '/api/v1/map',
|
||||
method: 'OPTIONS'
|
||||
|
@ -20,7 +20,7 @@ describe('raster', function () {
|
||||
assert.strictEqual(
|
||||
res.headers['access-control-allow-headers'],
|
||||
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id'
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id'
|
||||
);
|
||||
assert.strictEqual(res.headers['access-control-allow-origin'], '*');
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ describe('torque', function () {
|
||||
assert.strictEqual(
|
||||
res.headers['access-control-allow-headers'],
|
||||
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id'
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id'
|
||||
);
|
||||
assert.strictEqual(res.headers['access-control-allow-origin'], '*');
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ describe('template_api', function () {
|
||||
},
|
||||
function testCORS () {
|
||||
const allowHeaders = 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' +
|
||||
'Carto-Source-Lib, Carto-Source-Context, Carto-Source-Context-Id, Content-Type';
|
||||
'Carto-Event, Carto-Event-Source, Carto-Event-Group-Id, Content-Type';
|
||||
assert.response(server, {
|
||||
url: '/api/v1/map/named/acceptance1',
|
||||
method: 'OPTIONS'
|
||||
|
Loading…
Reference in New Issue
Block a user