fix(routing): enforce slashless public URLs
This commit is contained in:
5 files changed
+87
-5
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user