From: Barath Kumar R Date: Tue, 12 Jan 2021 14:54:28 +0000 (+0530) Subject: Fetching the location from API changed to proxy X-Git-Tag: branch-sol006v331-start~10 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNG-UI.git;a=commitdiff_plain;h=c5f85e89a414c171a1d0d855d2f6b1b372da9937 Fetching the location from API changed to proxy * The location based search for DC API is changed based on the proxy rule Change-Id: I30b1fc328787474def41de5997dce27d767e0d84 Signed-off-by: Barath Kumar R --- diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 1d3f29d..d168aa1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -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; } diff --git a/proxy.conf.json b/proxy.conf.json index e6a63c6..40b53f6 100644 --- a/proxy.conf.json +++ b/proxy.conf.json @@ -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 diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 55697ed..0e734b9 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -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', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 92b5193..ce65d13 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -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',