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

@bpframework/middleware-koa-cors

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpframework/middleware-koa-cors - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

libs/afterRoute.js

@@ -13,6 +13,6 @@ 'use strict';

export function setEnable(isEnable) {
exports.setEnable = function setEnable(isEnable) {
global[SYM_ENABLE] = isEnable;
}
export function setCfg(cfg) {
exports.setCfg = function setCfg(cfg) {

@@ -19,0 +19,0 @@ if (cfg.allowHeaders) {

@@ -10,3 +10,11 @@ 'use strict';

var afterRoute = require('./afterRoute');
module.exports = async function (ctx) {
// https://segmentfault.com/a/1190000000709909
if (ctx.method.toLowerCase() == 'options') {
await afterRoute(ctx);
ctx.response.body = '';
return false;
}
}

@@ -34,3 +34,3 @@ {

"name": "@bpframework/middleware-koa-cors",
"version": "0.0.1"
"version": "0.0.2"
}
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