Something went wrong. Try again.
Barazo default frontend barazo.forum
Something went wrong. Try again.
fix(api): remove NEXT_PUBLIC_API_URL to prevent localhost fallback in client bundle (#88) master
Turbopack was not dead-code-eliminating the typeof window ternary correctly, causing the server-side fallback (http://localhost:3000) to leak into the client bundle. The browser then made cross-origin requests to localhost instead of same-origin relative URLs, producing "NetworkError when attempting to fetch resource" on staging. Replace the fragile process.env pattern with a simple literal: client always uses '' (relative URLs via Caddy), server uses API_INTERNAL_URL.
Author Guido X Jansen Committer GitHub Date (Feb 26, 2026, 4:08 PM UTC) Commit a0be5880 a0be588082d3efaa93d666f3210dcfc555cb7581 Parent b02cc418 b02cc418ef36f28bd111deede7764b7ed8e17945