Skip to content

Commit

Permalink
Merge pull request #133 from HSLdevcom/next-waltti-routing
Browse files Browse the repository at this point in the history
Use next routing and routing data for waltti next endpoints
  • Loading branch information
vesameskanen authored Sep 29, 2020
2 parents 1ca8357 + 74d85cb commit d373058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ location /routing/v1/routers/next-hsl {
}

location /routing/v1/routers/next-waltti {
rewrite /routing/v1/routers/next-waltti(.*) /otp/routers/waltti$1 break;
proxy_pass http://opentripplanner-waltti:8080/;
rewrite /routing/v1/routers/next-waltti(.*) /otp/routers/default$1 break;
proxy_pass http://opentripplanner-next-waltti:8080/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down Expand Up @@ -310,7 +310,7 @@ location /routing-data/v2/next-hsl {

location /routing-data/v2/next-waltti {
rewrite /routing-data/v2/next-waltti/(.*) /$1 break;
proxy_pass http://opentripplanner-data-con-waltti:8080/;
proxy_pass http://opentripplanner-data-con-next-waltti:8080/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('api.digitransit.fi', function() {
testProxying('api.digitransit.fi','/routing/v1/routers/waltti','opentripplanner-waltti:8080');
testProxying('dev-api.digitransit.fi','/routing/v1/routers/next-finland','opentripplanner-finland:8080');
testProxying('dev-api.digitransit.fi','/routing/v1/routers/next-hsl','opentripplanner-hsl:8080');
testProxying('dev-api.digitransit.fi','/routing/v1/routers/next-waltti','opentripplanner-waltti:8080');
testProxying('dev-api.digitransit.fi','/routing/v1/routers/next-waltti','opentripplanner-next-waltti:8080');
testProxying('api.digitransit.fi','/routing-data/v2/hsl/router-hsl.zip','opentripplanner-data-con-hsl:8080');
testResponseHeader('api.digitransit.fi','/routing-data/v2/hsl/router-config.json', 'access-control-allow-origin', '*');
testProxying('api.digitransit.fi','/routing-data/v2/waltti/router-waltti.zip','opentripplanner-data-con-waltti:8080');
Expand All @@ -134,7 +134,7 @@ describe('api.digitransit.fi', function() {
testResponseHeader('api.digitransit.fi','/routing-data/v2/finland/router-config.json', 'access-control-allow-origin', '*');
testProxying('dev-api.digitransit.fi','/routing-data/v2/next-hsl/router-hsl.zip','opentripplanner-data-con-hsl:8080');
testResponseHeader('dev-api.digitransit.fi','/routing-data/v2/next-hsl/router-config.json', 'access-control-allow-origin', '*');
testProxying('dev-api.digitransit.fi','/routing-data/v2/next-waltti/router-waltti.zip','opentripplanner-data-con-waltti:8080');
testProxying('dev-api.digitransit.fi','/routing-data/v2/next-waltti/router-waltti.zip','opentripplanner-data-con-next-waltti:8080');
testResponseHeader('dev-api.digitransit.fi','/routing-data/v2/next-waltti/router-config.json', 'access-control-allow-origin', '*');
testProxying('dev-api.digitransit.fi','/routing-data/v2/next-finland/router-finland.zip','opentripplanner-data-con-finland:8080');
testResponseHeader('dev-api.digitransit.fi','/routing-data/v2/next-finland/router-config.json', 'access-control-allow-origin', '*');
Expand Down

0 comments on commit d373058

Please sign in to comment.