Rename headers for metrics

This commit is contained in:
Esther Lozano 2020-02-17 17:07:26 +01:00
parent 98325495ea
commit 59cb6f9c9c
6 changed files with 9 additions and 9 deletions

View File

@ -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') {

View File

@ -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'], '*');
} }

View File

@ -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'

View File

@ -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'], '*');
} }

View File

@ -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'], '*');
} }

View File

@ -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'