diff --git a/middleware/cors.js b/middleware/cors.js index 7abb3c8..c219cc2 100644 --- a/middleware/cors.js +++ b/middleware/cors.js @@ -36,7 +36,7 @@ export function createCors() { } res.set('Access-Control-Allow-Origin', `${protocol}//${host}`) - res.set('Access-Control-Allow-Methods', req.method) + res.set('Access-Control-Allow-Methods', '*') if (headers) { res.set('Access-Control-Allow-Headers', headers) diff --git a/package.json b/package.json index 2c27899..42398da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gm5/core", - "version": "2.0.2", + "version": "2.0.3", "type": "module", "description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手", "author": "yutent ",