Allow metrics custom headers in cors (#640)

* Allow metrics custom headers in cors

* Update NEWS.md
This commit is contained in:
Esther Lozano 2020-02-13 11:30:14 +01:00 committed by GitHub
parent fd719da6ac
commit 90ee8af129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,8 @@
## 5.0.2
Released 2020-mm-dd
- Updated allowed list of custom headers with the ones for metrics
## 5.0.1
Released 2020-01-27

View File

@ -7,6 +7,9 @@ module.exports = function cors (extraHeaders = []) {
'X-Prototype-Version',
'X-CSRF-Token',
'Authorization',
'Carto-Source-Lib',
'Carto-Source-Context',
'Carto-Source-Context-Id',
...extraHeaders
];

View File

@ -9,7 +9,10 @@ const accessControlHeaders = [
'X-Requested-With',
'X-Prototype-Version',
'X-CSRF-Token',
'Authorization'
'Authorization',
'Carto-Source-Lib',
'Carto-Source-Context',
'Carto-Source-Context-Id'
].join(', ');
const exposedHeaders = [