New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lws-cors

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lws-cors - npm Package Compare versions

Comparing version 4.1.2 to 4.2.0

16

index.js

@@ -13,7 +13,7 @@ import kcors from '@koa/cors'

name: 'cors.origin',
description: '`Access-Control-Allow-Origin` value. Default is the request Origin header.'
description: 'Set a `Access-Control-Allow-Origin` value. Default is the request Origin header.'
},
{
name: 'cors.allow-methods',
description: '`Access-Control-Allow-Methods` value. Default is "GET,HEAD,PUT,POST,DELETE,PATCH"'
description: 'Set a `Access-Control-Allow-Methods` value. Default is "GET,HEAD,PUT,POST,DELETE,PATCH"'
},

@@ -23,11 +23,16 @@ {

type: Boolean,
description: 'Adds `Access-Control-Allow-Credentials` header.'
description: 'Set this flag to add `Access-Control-Allow-Credentials` header.'
},
{
name: 'cors.opener-policy',
description: 'A value for the `Cross-Origin-Opener-Policy` header (specify `unsafe-none`, same-origin-allow-popups` or `same-origin`).'
description: 'Set a value for the `Cross-Origin-Opener-Policy` header (specify `unsafe-none`, same-origin-allow-popups` or `same-origin`).'
},
{
name: 'cors.embedder-policy',
description: 'A value for the `Cross-Origin-Embedder-Policy` header (specify `unsafe-none` or `require-corp`).'
description: 'Set a value for the `Cross-Origin-Embedder-Policy` header (specify `unsafe-none` or `require-corp`).'
},
{
name: 'cors.private-network-access',
type: Boolean,
description: 'Set this flag to enable `Access-Control-Request-Private-Network` support.'
}

@@ -42,2 +47,3 @@ ]

if (config.corsCredentials) corsOptions.credentials = config.corsCredentials
if (config.corsPrivateNetworkAccess) corsOptions.privateNetworkAccess = config.corsPrivateNetworkAccess

@@ -44,0 +50,0 @@ this.emit('verbose', 'middleware.cors.config', {

{
"name": "lws-cors",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "4.1.2",
"version": "4.2.0",
"description": "Support for setting Cross-Origin Resource Sharing (CORS) headers to lws",
"repository": "https://github.com/lwsjs/cors.git",
"repository": "https://github.com/lwsjs/cors",
"license": "MIT",

@@ -22,7 +22,7 @@ "keywords": [

"dependencies": {
"@koa/cors": "^3.2.0"
"@koa/cors": "^3.4.3"
},
"devDependencies": {
"lws": "^4.1.1",
"node-fetch": "^3.2.3",
"lws": "^4.1.2",
"node-fetch": "^3.3.0",
"test-runner": "^0.10.1"

@@ -29,0 +29,0 @@ },

@@ -10,3 +10,3 @@ [![view on npm](https://badgen.net/npm/v/lws-cors)](https://www.npmjs.org/package/lws-cors)

Support for setting Cross-Origin Resource Sharing (CORS) headers to lws. For usage instructions, see [here](https://github.com/lwsjs/local-web-server/wiki/How-to-configure-Cross-Origin-Resource-Sharing-(CORS)).
Support for setting Cross-Origin Resource Sharing (CORS) headers to lws. Wraps [@koajs/cors](https://github.com/koajs/cors). For usage instructions, see [here](https://github.com/lwsjs/local-web-server/wiki/How-to-configure-Cross-Origin-Resource-Sharing-(CORS)).

@@ -16,10 +16,12 @@ Adds the following options to lws.

```
--cors.origin `Access-Control-Allow-Origin` value. Default is the request Origin header.
--cors.allow-methods `Access-Control-Allow-Methods` value. Default is
"GET,HEAD,PUT,POST,DELETE,PATCH"
--cors.credentials Adds `Access-Control-Allow-Credentials` header.
--cors.opener-policy string A value for the `Cross-Origin-Opener-Policy` header (specify `unsafe-none`,
same-origin-allow-popups` or `same-origin`).
--cors.embedder-policy string A value for the `Cross-Origin-Embedder-Policy` header (specify `unsafe-none`
or `require-corp`).
--cors.origin string Set a `Access-Control-Allow-Origin` value. Default is the request Origin
header.
--cors.allow-methods string Set a `Access-Control-Allow-Methods` value. Default is
"GET,HEAD,PUT,POST,DELETE,PATCH"
--cors.credentials Set this flag to add `Access-Control-Allow-Credentials` header.
--cors.opener-policy string Set a value for the `Cross-Origin-Opener-Policy` header (specify `unsafe-
none`, same-origin-allow-popups` or `same-origin`).
--cors.embedder-policy string Set a value for the `Cross-Origin-Embedder-Policy` header (specify `unsafe-
none` or `require-corp`).
--cors.private-network-access Set this flag to enable `Access-Control-Request-Private-Network` support.
```

@@ -29,2 +31,2 @@

&copy; 2016-22 Lloyd Brookes \<75pound@gmail.com\>.
&copy; 2016-23 Lloyd Brookes \<75pound@gmail.com\>.

Sorry, the diff of this file is not supported yet

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