Comparing version 3.3.0 to 3.4.0
3.4.0 / 2022-08-19 | ||
================== | ||
**others** | ||
* [[`2cd4789`](http://github.com/koajs/cors/commit/2cd4789f66a64cd13228e7305cce9069bd2d1283)] - 🤖 TEST: Run test on Node.js 18 (#86) (fengmk2 <<fengmk2@gmail.com>>) | ||
* [[`ae56e05`](http://github.com/koajs/cors/commit/ae56e054cb669c73784f8a12ab6413abca6eff57)] - Create codeql-analysis.yml (fengmk2 <<fengmk2@gmail.com>>) | ||
* [[`c4b5d21`](http://github.com/koajs/cors/commit/c4b5d21e0cf5ab76109be65f4b7267d0ccacce81)] - refactor: use friendlier promise checking (#84) (Swain Molster <<swain.molster@gmail.com>>) | ||
* [[`fbe33bc`](http://github.com/koajs/cors/commit/fbe33bca26373965429356f02144507c31326cfc)] - 📖 DOC: Add privateNetworkAccess js to README (fengmk2 <<fengmk2@gmail.com>>) | ||
3.3.0 / 2022-03-29 | ||
@@ -3,0 +12,0 @@ ================== |
@@ -17,4 +17,5 @@ 'use strict'; | ||
* - {Boolean} secureContext `Cross-Origin-Opener-Policy` & `Cross-Origin-Embedder-Policy` headers.', default is false | ||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes | ||
* - {Boolean} privateNetworkAccess handle `Access-Control-Request-Private-Network` request by return `Access-Control-Allow-Private-Network`, default to false | ||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes | ||
* @see https://wicg.github.io/private-network-access/ | ||
* @return {Function} cors middleware | ||
@@ -65,4 +66,3 @@ * @public | ||
if (typeof options.origin === 'function') { | ||
origin = options.origin(ctx); | ||
if (origin instanceof Promise) origin = await origin; | ||
origin = await options.origin(ctx); | ||
if (!origin) return await next(); | ||
@@ -75,4 +75,3 @@ } else { | ||
if (typeof options.credentials === 'function') { | ||
credentials = options.credentials(ctx); | ||
if (credentials instanceof Promise) credentials = await credentials; | ||
credentials = await options.credentials(ctx); | ||
} else { | ||
@@ -79,0 +78,0 @@ credentials = !!options.credentials; |
{ | ||
"name": "@koa/cors", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "Cross-Origin Resource Sharing(CORS) for koa", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"egg-ci": "^1.19.0", | ||
"egg-ci": "^1.19.1", | ||
"eslint": "^5.15.1", | ||
@@ -50,3 +50,3 @@ "eslint-config-egg": "^7.1.0", | ||
"ci": { | ||
"version": "8, 10, 12, 14, 16", | ||
"version": "8, 10, 12, 14, 16, 18", | ||
"type": "github", | ||
@@ -53,0 +53,0 @@ "os": { |
@@ -54,2 +54,3 @@ @koa/cors | ||
* - {Boolean} secureContext `Cross-Origin-Opener-Policy` & `Cross-Origin-Embedder-Policy` headers.', default is false | ||
* - {Boolean} privateNetworkAccess handle `Access-Control-Request-Private-Network` request by return `Access-Control-Allow-Private-Network`, default to false | ||
* @return {Function} cors middleware | ||
@@ -71,6 +72,6 @@ * @api public | ||
|[<img src="https://avatars.githubusercontent.com/u/178720?v=4" width="100px;"/><br/><sub><b>erikfried</b></sub>](https://github.com/erikfried)<br/>|[<img src="https://avatars.githubusercontent.com/u/1217939?v=4" width="100px;"/><br/><sub><b>j-waaang</b></sub>](https://github.com/j-waaang)<br/>|[<img src="https://avatars.githubusercontent.com/u/4184677?v=4" width="100px;"/><br/><sub><b>ltomes</b></sub>](https://github.com/ltomes)<br/>|[<img src="https://avatars.githubusercontent.com/u/372420?v=4" width="100px;"/><br/><sub><b>lfreneda</b></sub>](https://github.com/lfreneda)<br/>|[<img src="https://avatars.githubusercontent.com/u/170299?v=4" width="100px;"/><br/><sub><b>matthewmueller</b></sub>](https://github.com/matthewmueller)<br/>|[<img src="https://avatars.githubusercontent.com/u/6006498?v=4" width="100px;"/><br/><sub><b>PlasmaPower</b></sub>](https://github.com/PlasmaPower)<br/>| | ||
[<img src="https://avatars.githubusercontent.com/u/8369011?v=4" width="100px;"/><br/><sub><b>xg-wang</b></sub>](https://github.com/xg-wang)<br/>|[<img src="https://avatars.githubusercontent.com/u/12003270?v=4" width="100px;"/><br/><sub><b>lishengzxc</b></sub>](https://github.com/lishengzxc)<br/>|[<img src="https://avatars.githubusercontent.com/u/514097?v=4" width="100px;"/><br/><sub><b>mcohen75</b></sub>](https://github.com/mcohen75)<br/> | ||
[<img src="https://avatars.githubusercontent.com/u/14932834?v=4" width="100px;"/><br/><sub><b>swain</b></sub>](https://github.com/swain)<br/>|[<img src="https://avatars.githubusercontent.com/u/8369011?v=4" width="100px;"/><br/><sub><b>xg-wang</b></sub>](https://github.com/xg-wang)<br/>|[<img src="https://avatars.githubusercontent.com/u/12003270?v=4" width="100px;"/><br/><sub><b>lishengzxc</b></sub>](https://github.com/lishengzxc)<br/>|[<img src="https://avatars.githubusercontent.com/u/514097?v=4" width="100px;"/><br/><sub><b>mcohen75</b></sub>](https://github.com/mcohen75)<br/> | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Mar 29 2022 18:21:55 GMT+0800`. | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Fri Aug 19 2022 09:10:47 GMT+0800`. | ||
<!-- GITCONTRIBUTOR_END --> |
Sorry, the diff of this file is not supported yet
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
16869
76
134