mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
A docs preview never serves apps/www/lib/redirects.js. That table belongs to the www project, which production requests pass through first. So a link that resolves through a redirect fails on a preview and passes on supabase.com, and the failure said only "should resolve (status 404)". Look the path up in that table on failure. When a redirect covers it, add the redirect and the destination to link to instead. A link with no redirect is just broken, so its message is unchanged. The link still fails either way. Loads redirects.js via createRequire as plain CommonJS data, so no www app code runs. Two things needed handling in the real table: two entries are host or query conditional and can't be evaluated without request context, and 27 destinations are absolute URLs or contain a query string that path-to-regexp can't compile. Only one of those has a dynamic source that would need substitution, so compile() is called only when a match captured params, and that call is still guarded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>