diff --git a/client/nginx.conf b/client/nginx.conf index 3aa17e6..ad04e53 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -5,7 +5,27 @@ server { root /usr/share/nginx/html; index index.html; + # SPA Angular : toutes les routes -> index.html location / { try_files $uri $uri/ /index.html; } -} + + # Proxy vers Presta sous /ps + location /ps/ { + # /ps/... -> https://shop.gameovergne.fr/api/... + proxy_pass https://shop.gameovergne.fr/api/; + + # changeOrigin: true + proxy_set_header Host shop.gameovergne.fr; + + # Header Authorization (clé Presta) – stockée côté serveur uniquement + proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI="; + + # HTTPS correct (SNI) + proxy_ssl_server_name on; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} \ No newline at end of file