Comparing version 0.3.4 to 0.3.5
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 @@ * * * |
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
20658