From 8755df31c97495499c4b9cf02a4f36cf2f802606 Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Sun, 1 Sep 2024 13:44:46 +0800 Subject: [PATCH] =?UTF-8?q?cors=E5=85=81=E8=AE=B8DELETE=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/src/Plugs/API/APILoader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/src/Plugs/API/APILoader.ts b/Server/src/Plugs/API/APILoader.ts index bb6ceda..f686acf 100644 --- a/Server/src/Plugs/API/APILoader.ts +++ b/Server/src/Plugs/API/APILoader.ts @@ -12,7 +12,7 @@ class APILoader { this.app.use(express.urlencoded({ extended: true })); this.app.use(cors({ origin: ['http://localhost:5173', 'http://note.ctbu.net.cn', 'http://124.223.5.195:23501'], - methods: ['GET', 'POST'], + methods: ['GET', 'POST', 'DELETE'], allowedHeaders: ['Content-Type', 'Authorization', 'Access-Control-Allow-Origin', ''], })); }