From b1992d69af455072f74b6d0b9d3e383d3a4519f9 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 23 Feb 2024 20:54:26 +0800 Subject: [PATCH 1/2] Update middleware/cors.js --- middleware/cors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/cors.js b/middleware/cors.js index 6b94c23..9e33204 100644 --- a/middleware/cors.js +++ b/middleware/cors.js @@ -32,7 +32,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) From 0cb5a56a6071ec570ad2f50d3b2ffab3eee7686d Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 23 Feb 2024 20:54:45 +0800 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ",