From 5f3fd8aa3e48dc175a2f86191e96f31be37a357a Mon Sep 17 00:00:00 2001 From: Alexis Date: Wed, 13 May 2026 13:14:46 +0200 Subject: [PATCH] chore: simplify Nginx configuration for handling `/orcid2words` paths to improve URL resolution and prevent 404 errors --- frontend/nginx.conf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index b53a317..dc9f102 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -11,13 +11,12 @@ server { return 301 /orcid2words/; } - # Apache forwards the full path; strip /orcid2words/ before resolving files under dist/. - location = /orcid2words { - return 301 /orcid2words/; - } - - location /orcid2words/ { - rewrite ^/orcid2words/(.*)$ /$1 break; + # Apache reenvía la URL completa (sin strip). Cubrimos `/orcid2words`, + # `/orcid2words/` y `/orcid2words/...` con un solo bloque para no depender + # de un `location = /orcid2words` exacto (que se ha visto caer en 404 según + # cómo Apache forme la URI reenviada). + location ~ ^/orcid2words(/.*)?$ { + rewrite ^/orcid2words/?(.*)$ /$1 break; try_files $uri $uri/ /index.html; } }