mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-25 17:15:01 +02:00
The nginx conf was lacking the page reconciliation. It is necessary to have it in place to avoid 404 errors when refreshing the page or accessing a page directly. It is a known issue when using the Next Router in "export" mode, as it relies on client-side routing.
31 lines
710 B
Plaintext
31 lines
710 B
Plaintext
server {
|
|
listen 8080;
|
|
listen 3000;
|
|
server_name localhost;
|
|
|
|
root /app;
|
|
|
|
location / {
|
|
try_files $uri index.html $uri/index.html =404;
|
|
|
|
add_header X-Frame-Options DENY always;
|
|
}
|
|
|
|
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;
|
|
|
|
add_header X-Frame-Options DENY always;
|
|
}
|
|
|
|
location ~ "^/user-reconciliations/(active|inactive)/[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 /user-reconciliations/$1/[id]/index.html;
|
|
|
|
add_header X-Frame-Options DENY always;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
}
|