@aomex/cors
Advanced tools
Comparing version 0.0.25 to 0.0.26
# @aomex/cors | ||
## 0.0.26 | ||
### Patch Changes | ||
- [`00bafbb`](https://github.com/aomex/aomex/commit/00bafbbac2d32205b63a6bf561fb0a69c38a54bb) Thanks [@geekact](https://github.com/geekact)! - refactor(core): 缓存迁移到新的包@aomex/internal-cache | ||
- Updated dependencies [[`00bafbb`](https://github.com/aomex/aomex/commit/00bafbbac2d32205b63a6bf561fb0a69c38a54bb), [`8becf8e`](https://github.com/aomex/aomex/commit/8becf8ee5ef86a5909783d0654e536db7be9bf5b), [`0776719`](https://github.com/aomex/aomex/commit/077671963401f1dafb5b03722899452d45df13fc), [`f996bf7`](https://github.com/aomex/aomex/commit/f996bf7e529e7751a5e858c579feed33f5f02d65)]: | ||
- @aomex/core@0.0.27 | ||
- @aomex/web@0.0.28 | ||
## 0.0.25 | ||
@@ -4,0 +14,0 @@ |
@@ -67,3 +67,3 @@ import { WebContext, WebMiddleware } from '@aomex/web'; | ||
/** | ||
* `CORS`,全称Cross-Origin Resource Sharing,是一种允许当前域(domain)的资源(比如html/js/web service)被其他域(domain)的脚本请求访问的机制,通常由于同域安全策略(the same-origin security policy)浏览器会禁止这种跨域请求。 | ||
* `CORS`,全称Cross-Origin Resource Sharing,是一种允许当前域(domain)的资源(比如html/js/web service)被其他域(domain)的脚本请求访问的机制,通常由于同域安全策略(the same-origin security policy),浏览器会禁止跨域请求。 | ||
*/ | ||
@@ -70,0 +70,0 @@ declare const cors: (options?: CorsOptions) => WebMiddleware; |
@@ -8,6 +8,3 @@ // src/index.ts | ||
var cors = (options = {}) => { | ||
options = { | ||
...defaults, | ||
...options | ||
}; | ||
options = { ...defaults, ...options }; | ||
["exposeHeaders", "allowMethods", "allowHeaders"].forEach((key) => { | ||
@@ -14,0 +11,0 @@ const value = options[key]; |
{ | ||
"name": "@aomex/cors", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "跨站资源共享", | ||
@@ -32,8 +32,8 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@aomex/core": "^0.0.26", | ||
"@aomex/web": "^0.0.27" | ||
"@aomex/core": "^0.0.27", | ||
"@aomex/web": "^0.0.28" | ||
}, | ||
"devDependencies": { | ||
"@aomex/core": "^0.0.26", | ||
"@aomex/web": "^0.0.27" | ||
"@aomex/core": "^0.0.27", | ||
"@aomex/web": "^0.0.28" | ||
}, | ||
@@ -40,0 +40,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
21160
176