One Missing Hyphen in Netlify URL Silently Broke DocMind AI's API Calls
A developer building DocMind AI, a RAG-based document chatbot, discovered that redeploying its frontend to a new Netlify domain caused all browser requests to the FastAPI backend to fail silently. The issue stemmed from a one-character difference: the new Netlify URL contained a hyphen ('docmindai-chatbot.netlify.app') while the backend's CORS allowlist still referenced the old hyphen-free domain. Browsers treat these as entirely separate origins, so every API request was blocked before reaching the server, leaving no backend logs to diagnose. The fix was a single-line addition to include the new domain in the allow_origins list, while keeping the existing strict CORS configuration intact. The incident highlights that CORS allowlists must reflect the exact deployed frontend URL, and that Netlify does not guarantee reuse of a previously assigned subdomain on redeployment.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in