Code & Deploy
siGit Code
Git Hosting
Toggle menu
siGit Code
Git Hosting
Sign in
Sign in
@devries-cameron20
/
OCIU-npo
Mirror · read-only
Fork
0
Mirrored from
https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 03:37 UTC
OCIU-npo
/
edge_proxy
/
cloudflare_worker.md
Code
Commits
Issues
Pulls
Cloud Agent
CICD
fix/restore-static-site
feat/music-production-only
fix/ociu-hero-navigation-20261109
fix/ociu-remove-placeholder-content
fix/restore-static-site
main
md
541 Bytes
View source
Raw
#
Cloudflare Worker Proxy for CamoFlow SSE
#
This handles the connection persistence and proxying to Cloud Run.
#
wrangler.toml
#
name = "camoflow-sse-proxy"
#
main = "src/index.ts"
#
compatibility_date = "2023-01-01"
#
src/index.ts
#
export default {
#
async fetch(request, env, ctx) {
#
const url = new URL(request.url);
#
if (url.pathname === "/api/events") {
#
return fetch("
https://camoflow-core-cloud-run/api/events
", {
#
headers: request.headers,
#
});
#
}
#
return fetch(request);
#
},
#
};