Refactor environment configurations and nginx settings for improved API routing and path handling

This commit is contained in:
Vincent Guillet
2025-11-28 10:32:03 +01:00
parent e5cce7668f
commit 6f05f66ea6
4 changed files with 3 additions and 16 deletions

View File

@@ -1,30 +1,20 @@
server {
listen 80;
listen [::]:80;
server_name _;
# Angular packagé par Nginx (classique)
root /usr/share/nginx/html;
index index.html;
# SPA Angular : toutes les routes front -> index.html
location / {
try_files $uri $uri/ /index.html;
}
# === Proxy vers PrestaShop (équivalent proxy.conf.json "/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;
# Auth Basic comme dans ton proxy.conf.json Angular
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
# HTTPS correct (SNI)
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;

View File

@@ -1,5 +1,5 @@
export const environment = {
production: true,
apiUrl: 'https://dev.vincent-guillet.fr/gameovergne-api/api',
psUrl: '/gameovergne/ps'
psUrl: '/gameovergne/ps'
};

View File

@@ -1,5 +1,5 @@
export const environment = {
production: false,
apiUrl: 'http://localhost:3000/api',
psUrl: 'ps'
psUrl: '/ps'
};