fix(routing): enforce slashless public URLs

This commit is contained in:
DeCentN2Madness committed 2026-10-25 13:13:46 -07:00
1 parent 7a6cab29db
commit f41af1966e
5 files changed
+87 -5

No files matched your search

+14
View File
@@ -1,3 +1,17 @@
## Include these directives inside the public HTTPS server block, before the
## generic static `location /` handler. Root (`/`) is the only trailing-slash
## public URL; every other terminal slash receives a query-preserving 308.
location ~ ^(.+?)/+$ {
return 308 $1$is_args$args;
}
## The static handler must serve the generated directory artifact at its
## slashless public path. Do not use `$uri/`, which permits nginx's automatic
## directory-slash redirect before `$uri/index.html` can be served.
location / {
try_files $uri $uri/index.html $uri.html =404;
}
rewrite ^/aba$ /aba-therapy permanent;
rewrite ^/autismevaluations$ /autism-evaluations permanent;
rewrite ^/learnersocialclub$ /learner-social-club permanent;