Fetching the location from API changed to proxy 73/10173/2
authorBarath Kumar R <barath.r@tataelxsi.co.in>
Tue, 12 Jan 2021 14:54:28 +0000 (20:24 +0530)
committerBarath Kumar R <barath.r@tataelxsi.co.in>
Thu, 21 Jan 2021 14:39:15 +0000 (20:09 +0530)
 * The location based search for DC API is changed based on the proxy
 rule

Change-Id: I30b1fc328787474def41de5997dce27d767e0d84
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
nginx/nginx.conf
proxy.conf.json
src/environments/environment.prod.ts
src/environments/environment.ts

index 1d3f29d..d168aa1 100644 (file)
@@ -28,6 +28,12 @@ server {
         proxy_set_header Accept-Encoding "";
     }
 
+    location /api {
+        proxy_pass https://photon.komoot.de;
+        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
+        proxy_set_header Accept-Encoding "";
+    }
+
     location / {
         try_files $uri $uri/ /index.html;
     }
index e6a63c6..40b53f6 100644 (file)
@@ -3,5 +3,10 @@
         "target": "https://nbi:9999",
         "secure": false,
         "logLevel": "info"
+    },
+    "/api/*": {
+        "target": "https://photon.komoot.de",
+        "secure": false,
+        "logLevel": "info"
     }
 }
\ No newline at end of file
index 55697ed..0e734b9 100644 (file)
@@ -53,8 +53,7 @@ export const environment = {
     packageSize: 50,
     paginationNumber: 10, //Possible values are 10, 25, 50, 100
     packageVersion: version,
-    // tslint:disable-next-line: no-http-string
-    MAPLATLONGAPI_URL: 'http://photon.komoot.de/api/?q={value}&limit=5',
+    MAPLATLONGAPI_URL: 'api/?q={value}&limit=5',
     GENERATETOKEN_URL: OSM_ADMIN_ENDPOINT + 'tokens',
     PROJECTS_URL: OSM_ADMIN_ENDPOINT + 'projects',
     USERS_URL: OSM_ADMIN_ENDPOINT + 'users',
index 92b5193..ce65d13 100644 (file)
@@ -53,8 +53,7 @@ export const environment = {
     packageSize: 50,
     paginationNumber: 10, //Possible values are 10, 25, 50, 100
     packageVersion: version,
-    // tslint:disable-next-line: no-http-string
-    MAPLATLONGAPI_URL: 'http://photon.komoot.de/api/?q={value}&limit=5',
+    MAPLATLONGAPI_URL: 'api/?q={value}&limit=5',
     GENERATETOKEN_URL: OSM_ADMIN_ENDPOINT + 'tokens',
     PROJECTS_URL: OSM_ADMIN_ENDPOINT + 'projects',
     USERS_URL: OSM_ADMIN_ENDPOINT + 'users',