Comparing version 0.3.5 to 1.0.0
12
index.js
@@ -9,8 +9,13 @@ module.exports = MiddlewareBase => class Cors extends MiddlewareBase { | ||
name: 'cors.origin', | ||
description: 'Access-Control-Allow-Origin value. Default is the request Origin header.' | ||
description: '`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: '`Access-Control-Allow-Methods` value. Default is "GET,HEAD,PUT,POST,DELETE,PATCH"' | ||
}, | ||
{ | ||
name: 'cors.credentials', | ||
type: Boolean, | ||
description: 'Adds `Access-Control-Allow-Credentials` header.' | ||
} | ||
] | ||
@@ -23,6 +28,7 @@ } | ||
if (options.corsAllowMethods) corsOptions.allowMethods = options.corsAllowMethods | ||
if (options.corsCredentials) corsOptions.credentials = options.corsCredentials | ||
this.emit('verbose', 'middleware.cors.config', corsOptions) | ||
const kcors = require('kcors') | ||
const kcors = require('@koa/cors') | ||
return kcors(corsOptions) | ||
} | ||
} |
{ | ||
"name": "lws-cors", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.3.5", | ||
"version": "1.0.0", | ||
"description": "Support for setting Cross-Origin Resource Sharing (CORS) headers to lws", | ||
@@ -19,6 +19,6 @@ "repository": "https://github.com/lwsjs/cors.git", | ||
"dependencies": { | ||
"kcors": "^2.2.1" | ||
"@koa/cors": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"lws": "^1.0.0-pre4.0", | ||
"lws": "^1.1.4", | ||
"req-then": "^0.6.4", | ||
@@ -25,0 +25,0 @@ "test-runner": "^0.4.0" |
@@ -5,2 +5,4 @@ const TestRunner = require('test-runner') | ||
const request = require('req-then') | ||
const usage = require('lws/lib/usage') | ||
usage.disable() | ||
@@ -7,0 +9,0 @@ const runner = new TestRunner() |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
46
1
4082
6
+ Added@koa/cors@^2.2.1
+ Added@koa/cors@2.2.3(transitive)
+ Addedvary@1.1.2(transitive)
- Removedkcors@^2.2.1
- Removedkcors@2.2.2(transitive)