From 90e8822c2a2036f3e2cdccc2ae0e1105abe7337c Mon Sep 17 00:00:00 2001 From: rca Date: Fri, 19 Jul 2024 02:16:23 +0900 Subject: [PATCH] =?UTF-8?q?Authorization=E3=83=98=E3=83=83=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=82=92=E5=8F=97=E3=81=91=E5=8F=96=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB,=20Allow-methods=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5b0a0e2..7b19d54 100644 --- a/src/index.ts +++ b/src/index.ts @@ -60,7 +60,8 @@ logger.info("Logging middleware enabled"); // !For debug only! app.use((_req: Request, res: Response, next: NextFunction) => { res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization"); + res.header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS"); next(); }); logger.warn("CORS allowed for all origins !For debug only!");