Huge News!Announcing our $40M Series B led by Abstract Ventures.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 0.3.4 to 0.3.5

8

index.js
module.exports = MiddlewareBase => class Cors extends MiddlewareBase {
description () {
return 'Support for adding Cross-Origin Resource Sharing (CORS) headers.'
return 'Support for setting Cross-Origin Resource Sharing (CORS) headers.'
}

@@ -9,3 +9,3 @@ optionDefinitions () {

name: 'cors.origin',
description: 'Access-Control-Allow-Origin value. Default is request Origin header.'
description: 'Access-Control-Allow-Origin value. Default is the request Origin header.'
},

@@ -21,4 +21,4 @@ {

const corsOptions = {}
if (options.corsOrigin) corsOptions.corsOrigin = options.corsOrigin
if (options.corsAllowMethods) corsOptions.corsAllowMethods = options.corsAllowMethods
if (options.corsOrigin) corsOptions.origin = options.corsOrigin
if (options.corsAllowMethods) corsOptions.allowMethods = options.corsAllowMethods
this.emit('verbose', 'middleware.cors.config', corsOptions)

@@ -25,0 +25,0 @@ const kcors = require('kcors')

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

@@ -7,0 +7,0 @@ "license": "MIT",

@@ -9,3 +9,3 @@ [![view on npm](https://img.shields.io/npm/v/lws-cors.svg)](https://www.npmjs.org/package/lws-cors)

Support for adding 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. For usage instructions, see [here](https://github.com/lwsjs/local-web-server/wiki/How-to-configure-Cross-Origin-Resource-Sharing-(CORS)).

@@ -12,0 +12,0 @@ * * *

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