# Render relay integration (HTTP preview) The Render relay is **optional**. When configured, Discord-family HTTP requests go through the Node.js relay on Render; other requests and WebSocket connections continue using the existing Cloudflare Worker implementation. This feature is on a separate branch and has not been production verified. ## Required settings on the Cloudflare Worker - `RENDER_RELAY_URL`: the deployed Render service's HTTPS **origin**, for example `https://your-service.onrender.com` (no path). - `RELAY_SHARED_SECRET`: a Worker **secret**, identical to the `RELAY_SHARED_SECRET` environment variable on Render, at least 32 characters. Set privately in both dashboards; do not put the secret in GitHub, browser JavaScript, `wrangler.jsonc` variables, or chat. The Worker continues requiring the existing `PROXY_PASSWORD` for user sessions. ## Validation before enabling 1. Confirm the Render health endpoint `/healthz` reports service status OK. 2. Run `npm ci && npm run types && npm run check && npm test && npm run build` in a safe preview environment. 3. Deploy the integration branch to a **separate preview Worker**, not the existing production Worker. 4. Set the Render URL and matching private secret on that preview Worker. 5. Exercise an allowed HTTP test request and confirm it returns Bare metadata without exposing `x-relay-token`. 6. Verify disallowed destinations remain blocked and the existing Cloudflare WebSocket path still works. Render is not automatically used when either setting is absent; Cloudflare continues to serve requests. This is not an automatic failover system. HTTP requests to Render may fail if Render is sleeping, unavailable, or responds with an upstream error. **Important:** The existing Render service may use a smaller request-body limit than the Cloudflare implementation. This integration does not establish compatibility for Discord login, authenticated messages, or voice/video traffic.