Skip to content

Commit

Permalink
Merge pull request #209 from HSLdevcom/DT-5570
Browse files Browse the repository at this point in the history
Add external endpoint for rata.digitraffic.fi
  • Loading branch information
vesameskanen authored Oct 14, 2022
2 parents 7a8c5c9 + 7281cab commit e67053c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions external.conf
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,15 @@ location /out/vantaa-api.giravolta.io/ {
proxy_cache_key $scheme$host$request_uri;
proxy_set_header Authorization GIRAVOLTA_VANTAA_AUTH;
}

#digitraffic realtime api (https://rata.digitraffic.fi/api/v1/trains/gtfs-rt-updates)
location /out/rata.digitraffic.fi/ {
proxy_pass https://rata.digitraffic.fi/;
include allowed-ips.conf;
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;
}

0 comments on commit e67053c

Please sign in to comment.