diff --git a/common.conf b/common.conf index d98bf99..ab405b0 100644 --- a/common.conf +++ b/common.conf @@ -255,6 +255,14 @@ location = /routing/v2/finland/gtfs/v1 { proxy_read_timeout 29500ms; } +location = /routing/v2/finland/health { + rewrite /routing/v2/finland/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-finland-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location = /routing/v2/routers/waltti/index/graphql { rewrite /routing/v2/(.*) /otp/$1 break; proxy_pass http://opentripplanner-waltti-v2:8080/; @@ -274,6 +282,14 @@ location = /routing/v2/waltti/gtfs/v1 { proxy_read_timeout 11500ms; } +location = /routing/v2/waltti/health { + rewrite /routing/v2/waltti/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-waltti-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location = /routing/v2/routers/waltti-alt/index/graphql { rewrite /routing/v2/(.*) /otp/$1 break; proxy_pass http://opentripplanner-waltti-alt-v2:8080/; @@ -293,6 +309,14 @@ location = /routing/v2/waltti-alt/gtfs/v1 { proxy_read_timeout 11500ms; } +location = /routing/v2/waltti-alt/health { + rewrite /routing/v2/waltti-alt/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-waltti-alt-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location = /routing/v2/routers/varely/index/graphql { rewrite /routing/v2/(.*) /otp/$1 break; proxy_pass http://opentripplanner-varely-v2:8080/; @@ -312,6 +336,14 @@ location = /routing/v2/varely/gtfs/v1 { proxy_read_timeout 11500ms; } +location = /routing/v2/varely/health { + rewrite /routing/v2/varely/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-varely-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location = /routing/v2-kela/routers/kela/index/graphql { rewrite /routing/v2-kela/(.*) /otp/$1 break; proxy_pass http://opentripplanner-kela-v2:8080/; @@ -331,6 +363,14 @@ location = /routing/v2-kela/kela/gtfs/v1 { proxy_read_timeout 29500ms; } +location = /routing/v2-kela/kela/health { + rewrite /routing/v2-kela/kela/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-kela-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location = /routing/v2/routers/hsl/index/graphql { rewrite /routing/v2/(.*) /otp/$1 break; proxy_pass http://opentripplanner-hsl-v2:8080/; @@ -350,6 +390,14 @@ location = /routing/v2/hsl/gtfs/v1 { proxy_read_timeout 11500ms; } +location = /routing/v2/hsl/health { + rewrite /routing/v2/hsl/(.*) /otp/actuators/$1 break; + proxy_pass http://opentripplanner-hsl-v2:8080/; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location /routing-data/v2/hsl { rewrite /routing-data/v2/hsl/(.*) /$1 break; proxy_pass http://opentripplanner-data-server-hsl:8080/; diff --git a/test.js b/test.js index 1677222..ab02d6d 100644 --- a/test.js +++ b/test.js @@ -157,6 +157,7 @@ describe('api.digitransit.fi', function() { v2routers.forEach(function(router) { testProxying('api.digitransit.fi',`/routing/v2/routers/${router}/index/graphql`, `opentripplanner-${router}-v2:8080`); testProxying('api.digitransit.fi',`/routing/v2/${router}/gtfs/v1`, `opentripplanner-${router}-v2:8080`); + testProxying('api.digitransit.fi',`/routing/v2/${router}/health`, `opentripplanner-${router}-v2:8080`); testResponseHeader('api.digitransit.fi',`/routing-data/v3/${router}/router-config.json`, 'access-control-allow-origin', '*'); testProxying('api.digitransit.fi',`/routing-data/v3/${router}/router-config.json`,`opentripplanner-data-server-${router}-v3:8080`); testProxying('api.digitransit.fi',`/map/v3/${router}/en/rental-stations/`, `opentripplanner-${router}-v2:8080`);