🐛(nginx) fix 404 when accessing a doc

We improve the nginx way to access to a specific
doc.
We stop to wait for a initial attempt that
give a 404. If we see a UUID in the url we will
redirect to the doc/[id] page. Next will then
manage the 404.
This commit is contained in:
Anthony LC
2025-04-10 22:54:59 +02:00
parent 96f6aeea60
commit b58c991c81
4 changed files with 13 additions and 13 deletions

View File

@@ -9,8 +9,8 @@ server {
try_files $uri index.html $uri/ =404;
}
location /docs/ {
error_page 404 /docs/[id]/;
location ~ "^/docs/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/?$" {
try_files $uri /docs/[id]/index.html;
}
error_page 404 /404.html;