From a1ff18144399a21bf043c4df1b53d2e14db52c67 Mon Sep 17 00:00:00 2001 From: Florian THIERRY Date: Sun, 22 Sep 2024 11:09:14 +0200 Subject: [PATCH] test conf prod. --- frontend/conf/nginx.conf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/conf/nginx.conf b/frontend/conf/nginx.conf index 7ebd77f..b5ed339 100644 --- a/frontend/conf/nginx.conf +++ b/frontend/conf/nginx.conf @@ -35,8 +35,18 @@ http { } # Everything under the Angular app is always redirected to Angular in the correct language - location ~ ^/(fr|en)/ { - try_files $uri /$1/index.html?$args; + location ~ ^/fr/ { + alias /usr/share/nginx/html/fr/; + try_files $uri /fr/index.html?$args; + proxy_set_header Host $host:$server_port; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location ~ ^/en/ { + alias /usr/share/nginx/html/en/; + try_files $uri /en/index.html?$args; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr;