# Cloudflare serves a matching file first and applies these rules only to paths
# that match none. A blanket "/* /index.html 200" therefore also answers a
# request for a hashed bundle that a deploy has not published yet -- with HTML,
# status 200 and four hours of public caching. The browser then files markup
# under a .js address, refuses it as a module script ("Expected a
# JavaScript-or-Wasm module script") and shows a blank screen until the cache
# entry expires, long after the real file has arrived on the server.
#
# So only the paths vue-router owns are rewritten to the shell. Everything else,
# a missing bundle above all, now ends in public/404.html with a real 404.
#
# The shell is addressed as "/", never as "/index.html". Cloudflare strips
# "/index" and ".html" from a destination, so "/tenants /index.html 200" does
# not rewrite -- it answers 308 to "/" and the requested path is lost. On a
# wildcard rule the stripped destination would re-enter the rule, so Cloudflare
# reports "Infinite loop detected", drops the rule, and the path ends in
# 404.html instead. "/" is not rewritten and keeps the address bar intact.
#
# Keep in sync with src/app/router.ts -- src/app/router.redirects.test.ts fails
# when a route has no rule here. Static rules first, then the dynamic ones.
/welcome / 200
/join-request / 200
/tenants / 200
/connections / 200
/servers / 200
/user-ids / 200
/backup / 200
/workspace / 200
/databases / 200
/applications / 200
/sync / 200
/quick-scan / 200
/views / 200
/preferences / 200
/applications/run/* / 200
/attachments/preview/* / 200
/document-scanner/* / 200
/database/* / 200
/tenant/* / 200
