fix: cors for files (#257)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
parent
45e897d475
commit
2ace076fce
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,10 @@ async function start() {
|
|||
const url = req.url.toLowerCase();
|
||||
if (!url.startsWith('/api') || url === '/api') return reply.notFound();
|
||||
}
|
||||
reply
|
||||
.header('Access-Control-Allow-Origin', '*')
|
||||
.header('Access-Control-Max-Age', '86400')
|
||||
.header('Access-Control-Allow-Headers', '*');
|
||||
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue