Files
ORCID2SWORD/frontend/nginx.conf
T

23 lines
604 B
Nginx Configuration File

server {
listen 5173;
listen [::]:5173;
server_name _;
root /app/dist;
index index.html;
# Tolerante al comportamiento de Apache (con o sin strip del prefijo):
# - Si llega `/orcid2words[/...]` → strip y servir.
# - Si llega `/` o cualquier otra ruta → servir SPA igualmente.
# Combinado con el `basename` dinámico de `main.jsx`, React Router se adapta.
location ~ ^/orcid2words(/.*)?$ {
rewrite ^/orcid2words/?(.*)$ /$1 break;
try_files $uri $uri/ /index.html;
}
location / {
try_files $uri $uri/ /index.html;
}
}