@devries-cameron20 / OCIU-npo Mirror · read-only
Fork 0

Mirrored from https://github.com/Camo67/OCIU-npo.git

Synced Nov 21, 03:37 UTC

1 # Cloudflare Worker Proxy for CamoFlow SSE
2 # This handles the connection persistence and proxying to Cloud Run.
3
4 # wrangler.toml
5 # name = "camoflow-sse-proxy"
6 # main = "src/index.ts"
7 # compatibility_date = "2023-01-01"
8
9 # src/index.ts
10 # export default {
11 # async fetch(request, env, ctx) {
12 # const url = new URL(request.url);
13 # if (url.pathname === "/api/events") {
14 # return fetch("https://camoflow-core-cloud-run/api/events", {
15 # headers: request.headers,
16 # });
17 # }
18 # return fetch(request);
19 # },
20 # };