diff --git a/external.conf b/external.conf index b5b53ce..aeb4033 100644 --- a/external.conf +++ b/external.conf @@ -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; +}