Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT-6320 new Liipi URL #253

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions external.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ location /out/data.foli.fi/ {
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
}

#park api https://parking.fintraffic.fi/api/v1/facilities.json?limit=-1
location /out/parking.fintraffic.fi/ {
proxy_pass https://parking.fintraffic.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;
}

#test park api https://parking-test.fintraffic.fi/api/v1/facilities.json?limit=-1
location /out/parking-test.fintraffic.fi/ {
proxy_pass https://parking-test.fintraffic.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;
}

#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: 0 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ describe('ext-proxy', function() {
this.timeout(5000);
testCaching(null,'/out/helsinki-fi.smoove.pro/api-public/stations',false);
testCaching(null,'/out/data.foli.fi/citybike/smoove',false);
testCaching(null,'/out/p.hsl.fi/api/v1/facilities.json?limit=-1',false);
testCaching(null,'/out/92.62.36.215/RTIX/trip-updates',false);
testCaching(null,'/out/stables.donkey.bike/api/public/gbfs/2/donkey_lappeenranta/en/station_status.json',false);
});
Loading