enable-spa-fallback
Enable SPA Fallback
SPA fallback serves your index.html when a request doesn’t match a static file and isn’t under an excluded API prefix. This supports client-side routing in SPAs.
Basic usage
Excluded prefixes
Requests starting with certain prefixes are excluded from fallback and will 404 if there’s no static match. By default these are /api and /doc.
Change or add prefixes:
When fallback is off
If WithSPAFallback(false) (or defaulted off in future configs), unknown non-asset routes return 404.