Update client/nginx.conf
This commit is contained in:
@@ -2,28 +2,25 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# ⚠ Ici on pointe directement sur le dossier "browser"
|
root /usr/share/nginx/html;
|
||||||
root /usr/share/nginx/html/browser;
|
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# === App Angular (SPA) servie à la racine du conteneur ===
|
# --- Angular SPA sous /gameovergne ---
|
||||||
# Traefik enlève déjà /gameovergne, donc ici on voit "/"
|
location /gameovergne/ {
|
||||||
location / {
|
try_files $uri $uri/ /gameovergne/index.html;
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# === Proxy PrestaShop : /ps/* -> https://shop.gameovergne.fr/api/* ===
|
# --- Proxy PrestaShop ---
|
||||||
# Côté navigateur, ton code appelle /gameovergne/ps/...
|
# Angular appelle /gameovergne/ps/xxx
|
||||||
# Traefik strippe /gameovergne -> Nginx voit /ps/...
|
# On doit forward vers https://shop.gameovergne.fr/api/xxx
|
||||||
location /ps/ {
|
location ^~ /gameovergne/ps/ {
|
||||||
proxy_pass https://shop.gameovergne.fr/api/;
|
# 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;
|
proxy_set_header Host shop.gameovergne.fr;
|
||||||
|
|
||||||
# Auth Basic comme dans ton ancien proxy.conf.json
|
|
||||||
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
||||||
|
|
||||||
proxy_ssl_server_name on;
|
proxy_ssl_server_name on;
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
Reference in New Issue
Block a user