Remove PrestaShop proxy configuration from nginx.conf
This commit is contained in:
@@ -2,34 +2,10 @@ 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/ {
|
|
||||||
# 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 Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
# IMPORTANT : on ne laisse PAS passer les redirections vers shop.*
|
|
||||||
proxy_redirect off;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user