fix: cors in auth_secret_key model (#499)

This commit is contained in:
Yige 2023-03-12 18:47:44 +08:00 committed by GitHub
parent 379bbcdd14
commit 86d720ecee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
"express"
],
"engines": {
"node": "^16 || ^18"
"node": "^16 || ^18 || ^19"
},
"scripts": {
"start": "esno ./src/index.ts",

View File

@ -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()
})