Browse Source

add nginx conf

Johan Le Baut 4 years ago
parent
commit
5f6a640d44
2 changed files with 6 additions and 1 deletions
  1. 1 1
      BordeauxData.js
  2. 5 0
      nginx-conf/bdx-traffic.conf

+ 1 - 1
BordeauxData.js

@@ -11,7 +11,7 @@ async function getTrafficPrevisions() {
   }
   if (res) {
     for (const record of res.data.records) {
-      data.push({ time: record.fields.bm_heure, prevision: record.fields.bm_prevision });
+      data.push({ heure: record.fields.bm_heure, prevision: record.fields.bm_prevision });
     }
   }
   return data

+ 5 - 0
nginx-conf/bdx-traffic.conf

@@ -0,0 +1,5 @@
+location /previsions {
+  proxy_set_header Host $host;
+  proxy_set_header Accept-Encoding "";
+  proxy_pass  http://localhost:8585/previsions;
+}