Skip to content

Commit

Permalink
Merge pull request #57 from HSLdevcom/DT-2626
Browse files Browse the repository at this point in the history
Add entry for turku smoove data
  • Loading branch information
pailakka authored May 14, 2018
2 parents 02f9aad + 5399ad0 commit 1a7d2ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions external.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ location /out/helsinki-fi.smoove.pro/ {
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
}

#turku smoove citybike api (http://data.foli.fi/citybike/smoove)
location /out/data.foli.fi/ {
proxy_pass http://data.foli.fi/;
allow 172.17.0.0/16;
allow 10.32.0.0/16;
deny all;
proxy_cache ext_cache;
proxy_cache_valid 200 30s;
proxy_cache_lock on;
add_header X-Proxy-Cache $upstream_cache_status;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
}

#hsl park api https://p.hsl.fi/api/v1/facilities.json?limit=-1
location /out/p.hsl.fi/ {
proxy_pass https://p.hsl.fi/;
Expand Down
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ describe('digitransit', function() {
describe('ext-proxy', function() {
this.timeout(5000);
testCaching('api.digitransit.fi','/out/helsinki-fi.smoove.pro/api-public/stations',false);
testCaching('api.digitransit.fi','/out/data.foli.fi/citybike/smoove',false);
testCaching('api.digitransit.fi','/out/p.hsl.fi/api/v1/facilities.json?limit=-1',false);
testCaching('api.digitransit.fi','/out/92.62.36.215/RTIX/trip-updates',false);
testCaching('api.digitransit.fi','/out/beta.liikennevirasto.fi/joukkoliikenne/manual_gtfsrt/api/gtfsrt/alerts',false);
Expand Down

0 comments on commit 1a7d2ff

Please sign in to comment.