mirror of
https://github.com/sune-org/D1P.git
synced 2026-01-13 16:17:59 +00:00
12 lines
338 B
JavaScript
12 lines
338 B
JavaScript
async function fetch(request) {
|
|
if (request.method === 'OPTIONS') {
|
|
const headers = new Headers()
|
|
headers.set('Access-Control-Allow-Origin', '*')
|
|
headers.set('Access-Control-Allow-Headers', 'Authorization, Content-Type')
|
|
return new Response(null, { headers })
|
|
}
|
|
return new Response('OK')
|
|
}
|
|
|
|
export default { fetch }
|