Update client/nginx.conf
This commit is contained in:
@@ -2,16 +2,24 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
# Angular build
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
# SPA Angular
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# === Proxy vers PrestaShop (équivalent proxy.conf.json) ===
|
||||||
location /ps/ {
|
location /ps/ {
|
||||||
proxy_pass https://shop.gameovergne.fr/api/;
|
# Réécrit /ps/<truc> -> /api/<truc> AVANT proxy_pass
|
||||||
|
rewrite ^/ps/(.*)$ /api/$1 break;
|
||||||
|
|
||||||
|
# Envoie vers le FO Presta
|
||||||
|
proxy_pass https://shop.gameovergne.fr;
|
||||||
|
|
||||||
|
# Host + auth comme en dev
|
||||||
proxy_set_header Host shop.gameovergne.fr;
|
proxy_set_header Host shop.gameovergne.fr;
|
||||||
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
||||||
|
|
||||||
@@ -20,5 +28,8 @@ server {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
# IMPORTANT : on ne laisse PAS passer les redirections vers shop.*
|
||||||
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user