Back to overview

omniroute.cloud web completely unavailable — Next.js standalone misconfigured behind Cloudflare Tunnel

Apr 3, 2026 at 8:03pm UTC
Affected services
WEB

Resolved
Apr 3, 2026 at 8:03pm UTC

After infrastructure changes on 2026-04-03, the web service became completely unavailable. Users were either redirected to localhost:3000/pl or received a 500 Internal Server Error.

Root cause: Next.js 14 standalone was running behind Cloudflare Tunnel without Nginx as an intermediate proxy. Next.js internally builds request URLs using its own fetchHostname:port (127.0.0.1:3000) instead of the public Host header, causing next-intl middleware to generate redirects and rewrites targeting https://localhost:3000 — which then triggered EPROTO SSL errors as Next.js tried to proxy requests to its own plain HTTP port over TLS.

Resolution: Nginx was introduced between Cloudflare Tunnel and Next.js to properly forward X-Forwarded-Host and X-Forwarded-Proto headers. Cloudflare Tunnel routes were updated to point to Nginx (ports 8080/8081). Post-build patches were added to deploy.sh to fix Next.js 14 internal URL construction in next-server.js.

Total downtime: ~14h 46m (2026-04-03 22:03 – 2026-04-04 12:49)