From 7ac0eab3212e324fb2ff5016790ec3f2cd8e97c5 Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 14 May 2026 10:20:19 +0200 Subject: [PATCH] fix(nginx): enhance configuration to prevent absolute redirects and ensure index.html is served without cache for improved SPA performance --- frontend/nginx.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 97e871a..186ed01 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -3,9 +3,19 @@ server { listen [::]:5173; server_name _; + # Evita que nginx fabrique `Location` absoluto con su puerto interno (5173) + # si en algún momento se emitiera una redirección. + absolute_redirect off; + port_in_redirect off; + root /app/dist; index index.html; + # index.html sin caché → evita que persistan 301/HTML antiguos en clientes. + location = /index.html { + add_header Cache-Control "no-store" always; + } + # Apache en Sinbad2 reescribe la URL pública `/orcid2words/...` a un prefijo # interno distinto (`/flintstones/...`) antes de llegar a este contenedor. # Hay que quitar ese prefijo y servir desde dist/ igual que con `/orcid2words/`