fix: ensure domain-based index rewriting works for SPAs

Previously, SPA routes (e.g. `/dashboard`) bypassed custom index rewriting
logic due to `actix_files` intercepting requests before the fallback handler.
This hotfix reorders route registration and introduces explicit handling for
unmatched paths and root (/) to support React-style routing with domain-specific
index.html rewrites.
This commit is contained in:
Andrew 2025-05-05 23:58:18 +07:00
parent 3b8360fa40
commit 85de86f835
3 changed files with 65 additions and 29 deletions

2
Cargo.lock generated
View file

@ -1267,7 +1267,7 @@ dependencies = [
[[package]]
name = "servant"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"actix-files",
"actix-web",