Update middleware/cors.js

master
yutent 2024-02-23 20:54:26 +08:00
parent 38c79587e2
commit b1992d69af
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ export function createCors() {
} }
res.set('Access-Control-Allow-Origin', `${protocol}//${host}`) res.set('Access-Control-Allow-Origin', `${protocol}//${host}`)
res.set('Access-Control-Allow-Methods', req.method) res.set('Access-Control-Allow-Methods', '*')
if (headers) { if (headers) {
res.set('Access-Control-Allow-Headers', headers) res.set('Access-Control-Allow-Headers', headers)