Comparing version 1.0.2 to 1.0.3
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cors = void 0; | ||
var vary_1 = require("./vary"); | ||
var object_assign_1 = __importDefault(require("./object-assign")); | ||
function cors(options) { | ||
if (options === void 0) { options = {}; } | ||
var assign = require('object-assign'); | ||
var vary = require('vary'); | ||
var defaults = { | ||
@@ -141,3 +144,3 @@ origin: '*', | ||
else if (header.key === 'Vary' && header.value) { | ||
vary(res, header.value); | ||
vary_1.vary(res, header.value); | ||
} | ||
@@ -193,3 +196,3 @@ else if (header.value) { | ||
else { | ||
var corsOptions = assign({}, defaults, options); | ||
var corsOptions = object_assign_1.default({}, defaults, options); | ||
var originCallback = null; | ||
@@ -196,0 +199,0 @@ if (corsOptions.origin && typeof corsOptions.origin === 'function') { |
{ | ||
"name": "cors-ts", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Cors package with type definitions", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17417
9
411