ES6 goodies

This commit is contained in:
Daniel García Aubert 2018-03-01 18:47:07 +01:00
parent 314508bcd8
commit e6ba467d98

View File

@ -1,6 +1,6 @@
module.exports = function cors(extraHeaders) {
module.exports = function cors (extraHeaders) {
return function corsMiddleware (req, res, next) {
var baseHeaders = "X-Requested-With, X-Prototype-Version, X-CSRF-Token";
let baseHeaders = "X-Requested-With, X-Prototype-Version, X-CSRF-Token";
if(extraHeaders) {
baseHeaders += ", " + extraHeaders;