From 8088d3efb78f6d96e933845d9025d4881b35ccd3 Mon Sep 17 00:00:00 2001 From: Vincent Guillet Date: Fri, 28 Nov 2025 18:23:38 +0000 Subject: [PATCH] Update client/nginx.conf --- client/nginx.conf | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/client/nginx.conf b/client/nginx.conf index 42016aa..15f5137 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -2,28 +2,25 @@ server { listen 80; server_name _; - # ⚠ Ici on pointe directement sur le dossier "browser" - root /usr/share/nginx/html/browser; + root /usr/share/nginx/html; index index.html; - # === App Angular (SPA) servie à la racine du conteneur === - # Traefik enlève déjà /gameovergne, donc ici on voit "/" - location / { - try_files $uri $uri/ /index.html; + # --- Angular SPA sous /gameovergne --- + location /gameovergne/ { + try_files $uri $uri/ /gameovergne/index.html; } - # === Proxy PrestaShop : /ps/* -> https://shop.gameovergne.fr/api/* === - # Côté navigateur, ton code appelle /gameovergne/ps/... - # Traefik strippe /gameovergne -> Nginx voit /ps/... - location /ps/ { - proxy_pass https://shop.gameovergne.fr/api/; + # --- Proxy PrestaShop --- + # Angular appelle /gameovergne/ps/xxx + # On doit forward vers https://shop.gameovergne.fr/api/xxx + location ^~ /gameovergne/ps/ { + # IMPORTANT : supprime le prefixe /gameovergne/ps/ + rewrite ^/gameovergne/ps/(.*)$ /api/$1 break; + + proxy_pass https://shop.gameovergne.fr; - # "changeOrigin: true" proxy_set_header Host shop.gameovergne.fr; - - # Auth Basic comme dans ton ancien proxy.conf.json proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI="; - proxy_ssl_server_name on; proxy_set_header X-Real-IP $remote_addr;