From 2d6941978365ad654aef5a160d3cbf2d4f7ca031 Mon Sep 17 00:00:00 2001
From: ncastejon <castejon.nicolas@gmail.com>
Date: Thu, 12 Apr 2018 13:47:45 +0200
Subject: [PATCH] Fix redirect on flag click - Change nginx docker server name
 for elasticsearch

---
 Dockerfile                             | 5 ++++-
 proxy.conf                             | 2 +-
 webapp/src/environments/environment.ts | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index ecebd1c2..dbc46c3c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,10 @@ COPY ./webapp /app/webapp
 WORKDIR /app/webapp
 # Install npm dependencies
 RUN npm install
-RUN npm rebuild node-sass
+
+# For windows environment, with already a node_modules folder, we need reinstall the node-sass package
+#RUN npm rebuild node-sass
+
 # Building the Angular app /dist i18n
 RUN npm run build-i18n
 
diff --git a/proxy.conf b/proxy.conf
index aeb138e0..f8055d32 100644
--- a/proxy.conf
+++ b/proxy.conf
@@ -1,6 +1,6 @@
 server {
     listen 80;
-    server_name _;
+    server_name localhost;
 
     location / {
         proxy_pass https://elastic2.recette.data.grandlyon.com/elastic/;
diff --git a/webapp/src/environments/environment.ts b/webapp/src/environments/environment.ts
index 33055bf2..dccd5887 100644
--- a/webapp/src/environments/environment.ts
+++ b/webapp/src/environments/environment.ts
@@ -12,7 +12,7 @@ export const environment = {
   },
 
   angularAppHost: {
-    fr: 'http://localhost:8080/fr',
-    en: 'http://localhost:8080/en'
+    fr: '/fr',
+    en: '/en'
   }
 };
-- 
GitLab