From 6f05f66ea622a258d3c45c7f6e4c3cd84e0aac59 Mon Sep 17 00:00:00 2001 From: Vincent Guillet Date: Fri, 28 Nov 2025 10:32:03 +0100 Subject: [PATCH] Refactor environment configurations and nginx settings for improved API routing and path handling --- api/src/main/resources/application.properties | 5 +---- client/nginx.conf | 10 ---------- client/src/environments/environment.prod.ts | 2 +- client/src/environments/environment.ts | 2 +- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/api/src/main/resources/application.properties b/api/src/main/resources/application.properties index 84f0d36..6e9428b 100644 --- a/api/src/main/resources/application.properties +++ b/api/src/main/resources/application.properties @@ -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= \ No newline at end of file +jwt.secret=a23ac96ce968bf13099d99410b951dd498118851bdfc996a3f844bd68b1b2afd \ No newline at end of file diff --git a/client/nginx.conf b/client/nginx.conf index f256e47..4b2e7e2 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -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; diff --git a/client/src/environments/environment.prod.ts b/client/src/environments/environment.prod.ts index c20461d..7e67379 100644 --- a/client/src/environments/environment.prod.ts +++ b/client/src/environments/environment.prod.ts @@ -1,5 +1,5 @@ export const environment = { production: true, apiUrl: 'https://dev.vincent-guillet.fr/gameovergne-api/api', - psUrl: '/gameovergne/ps' + psUrl: '/gameovergne/ps' }; diff --git a/client/src/environments/environment.ts b/client/src/environments/environment.ts index 8146fd1..63de950 100644 --- a/client/src/environments/environment.ts +++ b/client/src/environments/environment.ts @@ -1,5 +1,5 @@ export const environment = { production: false, apiUrl: 'http://localhost:3000/api', - psUrl: 'ps' + psUrl: '/ps' };