Gathering detailed insights and metrics for koa2-cors-es2017
Gathering detailed insights and metrics for koa2-cors-es2017
Gathering detailed insights and metrics for koa2-cors-es2017
Gathering detailed insights and metrics for koa2-cors-es2017
npm install koa2-cors-es2017
Typescript
Module System
Node Version
NPM Version
68.2
Supply Chain
87.3
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
750
Last Day
1
Last Week
2
Last Month
4
Last Year
51
238 Stars
26 Commits
13 Forks
3 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
koa2-cors-es2017@2.1.0
Size
2.67 kB
NPM Version
4.1.2
Node Version
7.6.0
Publised On
09 Mar 2017
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
100%
2
Compared to previous week
Last month
33.3%
4
Compared to previous month
Last year
-30.1%
51
Compared to previous year
No dependencies detected.
1npm install --save koa2-cors
1var koa = require('koa'); 2var cors = require('koa2-cors'); 3 4var app = koa(); 5app.use(cors());
Configures the Access-Control-Allow-Origin CORS header. expects a string. Can also be set to a function, which takes the ctx
as the first parameter.
Configures the Access-Control-Expose-Headers CORS header. Expects a comma-delimited array.
Configures the Access-Control-Max-Age CORS header. Expects a Number.
Configures the Access-Control-Allow-Credentials CORS header. Expects a Boolean.
Configures the Access-Control-Allow-Methods CORS header. Expects a comma-delimited array , If not specified, default allowMethods is ['GET', 'PUT', 'POST', 'DELETE', 'HEAD', 'OPTIONS']
.
Configures the Access-Control-Allow-Headers CORS header. Expects a comma-delimited array . If not specified, defaults to reflecting the headers specified in the request's Access-Control-Request-Headers header.
1var koa = require('koa'); 2var cors = require('koa2-cors'); 3 4var app = koa(); 5app.use(cors({ 6 origin: function(ctx) { 7 if (ctx.url === '/test') { 8 return false; 9 } 10 return '*'; 11 }, 12 exposeHeaders: ['WWW-Authenticate', 'Server-Authorization'], 13 maxAge: 5, 14 credentials: true, 15 allowMethods: ['GET', 'POST', 'DELETE'], 16 allowHeaders: ['Content-Type', 'Authorization', 'Accept'], 17})); 18...
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
62 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More