Refactor environment configurations and nginx settings for improved API routing and path handling
This commit is contained in:
@@ -11,6 +11,3 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
|
|||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
|
|
||||||
jwt.secret=a23ac96ce968bf13099d99410b951dd498118851bdfc996a3f844bd68b1b2afd
|
jwt.secret=a23ac96ce968bf13099d99410b951dd498118851bdfc996a3f844bd68b1b2afd
|
||||||
|
|
||||||
prestashop.base-url=https://shop.gameovergne.fr
|
|
||||||
prestashop.basic-auth=MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=
|
|
||||||
@@ -1,30 +1,20 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
|
||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# Angular packagé par Nginx (classique)
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# SPA Angular : toutes les routes front -> index.html
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# === Proxy vers PrestaShop (équivalent proxy.conf.json "/ps") ===
|
|
||||||
location /ps/ {
|
location /ps/ {
|
||||||
# /ps/... -> https://shop.gameovergne.fr/api/...
|
|
||||||
proxy_pass https://shop.gameovergne.fr/api/;
|
proxy_pass https://shop.gameovergne.fr/api/;
|
||||||
|
|
||||||
# changeOrigin: true
|
|
||||||
proxy_set_header Host shop.gameovergne.fr;
|
proxy_set_header Host shop.gameovergne.fr;
|
||||||
|
|
||||||
# Auth Basic comme dans ton proxy.conf.json Angular
|
|
||||||
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
||||||
|
|
||||||
# HTTPS correct (SNI)
|
|
||||||
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;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
apiUrl: 'https://dev.vincent-guillet.fr/gameovergne-api/api',
|
apiUrl: 'https://dev.vincent-guillet.fr/gameovergne-api/api',
|
||||||
psUrl: '/gameovergne/ps'
|
psUrl: '/gameovergne/ps'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
apiUrl: 'http://localhost:3000/api',
|
apiUrl: 'http://localhost:3000/api',
|
||||||
psUrl: 'ps'
|
psUrl: '/ps'
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user