Skip to content

Commit

Permalink
allows all origins
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrosGounis committed Sep 29, 2024
1 parent 26c6889 commit 79baff9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/events/handle-events.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Env } from "../../worker-configuration"

const HEADERS = {
'Access-Control-Allow-Origin': '*',
'Cache-Control': 'no-store, no-cache',
'Expires': '0'
}

export async function handleEvents(request: Request, env: Env, _ctx: ExecutionContext): Promise<Response> {
const url = new URL(request.url)

Expand All @@ -23,6 +29,6 @@ export async function handleEvents(request: Request, env: Env, _ctx: ExecutionCo
event_id: eventId
}))

return new Response('ok', { status: 200 });
return new Response('ok', { status: 200, headers: HEADERS });
}

0 comments on commit 79baff9

Please sign in to comment.