fix: cors for files (#257)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
Jayvin Hernandez 2023-01-15 11:26:30 -08:00 committed by GitHub
parent 45e897d475
commit 2ace076fce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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