diff --git a/tools/dev-deploy/Caddyfile.dev b/tools/dev-deploy/Caddyfile.dev index eb949a1..36cebe7 100644 --- a/tools/dev-deploy/Caddyfile.dev +++ b/tools/dev-deploy/Caddyfile.dev @@ -27,7 +27,19 @@ # `ui/frontend/vite.config.ts`. @connect path /galaxy.gateway.v1.EdgeGateway/* handle @connect { - reverse_proxy galaxy-api:9090 + # `flush_interval -1` disables Caddy's response buffering on + # this path so server-streaming Connect-Web responses (the + # SubscribeEvents push channel) deliver each event to the + # browser as soon as the gateway flushes it. Without it + # Caddy buffers the initial `gateway.service_time` frame + # and Safari's fetch-streaming layer treats the body as + # idle, cancels within ~2 s, and falls into a tight + # reconnect loop the user sees as the intermittent + # "Fetch API cannot load … due to access control checks" + # console error. + reverse_proxy galaxy-api:9090 { + flush_interval -1 + } } reverse_proxy galaxy-api:8080 }