Rename headers for metrics

remotes/origin/node-12
Esther Lozano 5 years ago
parent 98325495ea
commit 59cb6f9c9c

@ -7,9 +7,9 @@ module.exports = function cors () {
'X-Prototype-Version', 'X-Prototype-Version',
'X-CSRF-Token', 'X-CSRF-Token',
'Authorization', 'Authorization',
'Carto-Source-Lib', 'Carto-Event',
'Carto-Source-Context', 'Carto-Event-Source',
'Carto-Source-Context-Id' 'Carto-Event-Group-Id'
]; ];
if (req.method === 'OPTIONS') { if (req.method === 'OPTIONS') {

@ -43,7 +43,7 @@ describe('attributes', function () {
assert.strictEqual( assert.strictEqual(
res.headers['access-control-allow-headers'], res.headers['access-control-allow-headers'],
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + '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'], '*'); assert.strictEqual(res.headers['access-control-allow-origin'], '*');
} }

@ -28,7 +28,7 @@ describe('multilayer', function () {
assert.strictEqual( assert.strictEqual(
res.headers['access-control-allow-headers'], res.headers['access-control-allow-headers'],
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + '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'], '*'); 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) { it('geting options on layergroup should return CORS headers', function (done) {
const allowHeaders = 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + 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, { assert.response(server, {
url: '/api/v1/map', url: '/api/v1/map',
method: 'OPTIONS' method: 'OPTIONS'

@ -20,7 +20,7 @@ describe('raster', function () {
assert.strictEqual( assert.strictEqual(
res.headers['access-control-allow-headers'], res.headers['access-control-allow-headers'],
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + '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'], '*'); assert.strictEqual(res.headers['access-control-allow-origin'], '*');
} }

@ -31,7 +31,7 @@ describe('torque', function () {
assert.strictEqual( assert.strictEqual(
res.headers['access-control-allow-headers'], res.headers['access-control-allow-headers'],
'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + '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'], '*'); assert.strictEqual(res.headers['access-control-allow-origin'], '*');
} }

@ -304,7 +304,7 @@ describe('template_api', function () {
}, },
function testCORS () { function testCORS () {
const allowHeaders = 'X-Requested-With, X-Prototype-Version, X-CSRF-Token, Authorization, ' + 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, { assert.response(server, {
url: '/api/v1/map/named/acceptance1', url: '/api/v1/map/named/acceptance1',
method: 'OPTIONS' method: 'OPTIONS'

Loading…
Cancel
Save