@halsp/cors
Advanced tools
Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "@halsp/cors", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Halsp 跨域插件", | ||
@@ -36,4 +36,4 @@ "engines": { | ||
"dependencies": { | ||
"@halsp/core": "^2.2.1", | ||
"@halsp/http": "^2.2.1" | ||
"@halsp/core": "^2.2.2", | ||
"@halsp/http": "^2.2.2" | ||
}, | ||
@@ -52,3 +52,3 @@ "files": [ | ||
], | ||
"gitHead": "f60b068fa3725caeda248df1e97fb05e2855edc4" | ||
"gitHead": "9819a52d52209fdaf4fc84a25ed602cb03cffd89" | ||
} |
@@ -59,3 +59,3 @@ import { Middleware } from "@halsp/core"; | ||
"same-origin", | ||
() => !!this.options.secureContext | ||
() => !!this.options.secureContext, | ||
); | ||
@@ -65,3 +65,3 @@ this.#set( | ||
"require-corp", | ||
() => !!this.options.secureContext | ||
() => !!this.options.secureContext, | ||
); | ||
@@ -73,3 +73,3 @@ | ||
this.options.maxAge, | ||
() => !!this.options.maxAge | ||
() => !!this.options.maxAge, | ||
); | ||
@@ -81,3 +81,3 @@ this.#set( | ||
!!this.options.privateNetworkAccess && | ||
!!this.ctx.req.has("Access-Control-Request-Private-Network") | ||
!!this.ctx.req.has("Access-Control-Request-Private-Network"), | ||
); | ||
@@ -87,3 +87,3 @@ this.#set( | ||
allowMethods, | ||
() => !!allowMethods | ||
() => !!allowMethods, | ||
); | ||
@@ -102,3 +102,3 @@ | ||
this.options.exposeHeaders, | ||
() => !!this.options.exposeHeaders | ||
() => !!this.options.exposeHeaders, | ||
); | ||
@@ -105,0 +105,0 @@ } |
@@ -21,3 +21,3 @@ import { HttpMethods } from "@halsp/http"; | ||
expect(res.getHeader("Access-Control-Allow-Origin")).toBe( | ||
"https://halsp.org" | ||
"https://halsp.org", | ||
); | ||
@@ -32,3 +32,3 @@ }); | ||
.setHeader("Origin", "https://halsp.org") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -48,3 +48,3 @@ .useCors() | ||
.setHeader("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -51,0 +51,0 @@ .useCors() |
@@ -36,3 +36,3 @@ import "@halsp/testing"; | ||
.set("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -54,3 +54,3 @@ .useCors({ | ||
.set("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -71,3 +71,3 @@ .useCors({ | ||
.set("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -89,3 +89,3 @@ .useCors({ | ||
.set("Access-Control-Request-Private-Network", "true") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -117,3 +117,3 @@ .useCors({ | ||
.set("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -140,3 +140,3 @@ .useCors() | ||
.set("Access-Control-Request-Method", "POST") | ||
.setMethod(HttpMethods.options) | ||
.setMethod(HttpMethods.options), | ||
) | ||
@@ -143,0 +143,0 @@ .useCors({ |
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
20921
Updated@halsp/core@^2.2.2
Updated@halsp/http@^2.2.2