From 071fd86dd05d2216dd81d3f0ce08ca48378570b0 Mon Sep 17 00:00:00 2001 From: yi-ge Date: Sat, 11 Mar 2023 18:47:55 +0800 Subject: [PATCH] fix: cors in auth_secret_key model --- service/package.json | 2 +- service/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/package.json b/service/package.json index aa75b7c6a9..5a735dd5f8 100644 --- a/service/package.json +++ b/service/package.json @@ -11,7 +11,7 @@ "express" ], "engines": { - "node": "^16 || ^18" + "node": "^16 || ^18 || ^19" }, "scripts": { "start": "esno ./src/index.ts", diff --git a/service/src/index.ts b/service/src/index.ts index 04b5134930..402deaa424 100644 --- a/service/src/index.ts +++ b/service/src/index.ts @@ -11,7 +11,7 @@ app.use(express.json()) app.all('*', (_, res, next) => { res.header('Access-Control-Allow-Origin', '*') - res.header('Access-Control-Allow-Headers', 'Content-Type') + res.header('Access-Control-Allow-Headers', 'authorization, Content-Type') res.header('Access-Control-Allow-Methods', '*') next() })