Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@halsp/cors

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@halsp/cors - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

8

package.json
{
"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({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc