Mirrored from https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 07:15 UTC
fix/ociu-hero-navigation-20261109
| 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 | # }; |