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

@@ -10,7 +10,4 @@ spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.show-sql=true
jwt.secret=a23ac96ce968bf13099d99410b951dd498118851bdfc996a3f844bd68b1b2afd
prestashop.base-url=https://shop.gameovergne.fr
prestashop.basic-auth=MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=
jwt.secret=a23ac96ce968bf13099d99410b951dd498118851bdfc996a3f844bd68b1b2afd

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'
};