@aomex/cors
Advanced tools
Comparing version 1.0.1 to 1.0.2
# @aomex/cors | ||
## 1.0.2 | ||
## 1.0.1 | ||
@@ -4,0 +6,0 @@ |
@@ -29,4 +29,3 @@ // src/index.ts | ||
} | ||
if (!origin) | ||
return next(); | ||
if (!origin) return next(); | ||
let credentials; | ||
@@ -39,4 +38,3 @@ if (typeof options.credentials === "function") { | ||
if (request.method === "OPTIONS") { | ||
if (!request.headers["access-control-request-method"]) | ||
return next(); | ||
if (!request.headers["access-control-request-method"]) return next(); | ||
response.setHeader("Access-Control-Allow-Origin", origin); | ||
@@ -43,0 +41,0 @@ credentials && response.setHeader("Access-Control-Allow-Credentials", "true"); |
{ | ||
"name": "@aomex/cors", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "跨站资源共享", | ||
@@ -34,4 +34,4 @@ "repository": "git@github.com:aomex/aomex.git", | ||
"@types/vary": "^1.1.3", | ||
"@aomex/core": "^1.0.1", | ||
"@aomex/web": "^1.0.1" | ||
"@aomex/core": "^1.0.2", | ||
"@aomex/web": "^1.0.2" | ||
}, | ||
@@ -38,0 +38,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
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
16957
148