Update middleware/cors.js
parent
38c79587e2
commit
b1992d69af
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue