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

koa-cors

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-cors - npm Package Compare versions

Comparing version 0.0.1 to 0.0.3

5

index.js

@@ -32,3 +32,5 @@ /**

*/
if (options.origin === true) {
if (options.origin === false) {
return;
} else if (options.origin === true) {
options.origin = this.header.origin;

@@ -80,2 +82,3 @@ } else if (!options.origin) {

this.status = 204;
return;
}

@@ -82,0 +85,0 @@

2

package.json
{
"name": "koa-cors",
"version": "0.0.1",
"version": "0.0.3",
"description": "CORS middleware for koa",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -34,3 +34,3 @@ koa-cors

### origin
Configures the **Access-Control-Allow-Origin** CORS header. Expects a string (ex: "http://example.com"). Set to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), as defined by `req.header('Origin')`. Set to `false` to disable CORS. Can also be set to a function, which takes the request as the first parameter.
Configures the **Access-Control-Allow-Origin** CORS header. Expects a string (ex: http://example.com). Set to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), as defined by `req.header('Origin')`. Set to `false` to disable CORS. Can also be set to a function, which takes the request as the first parameter.

@@ -37,0 +37,0 @@ ### methods

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