Update client/nginx.conf
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user