From a2138c3b92f1dc19b6212644c2d976d974e2f303 Mon Sep 17 00:00:00 2001 From: Janne Antikainen Date: Fri, 28 May 2021 13:46:10 +0300 Subject: [PATCH 1/3] DT-4675: Add city bikes to Tampere's instance Tampere city bike instance --- external.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/external.conf b/external.conf index a791495..e8af0d6 100644 --- a/external.conf +++ b/external.conf @@ -149,7 +149,7 @@ location /out/lsl.mattersoft.fi/ { proxy_set_header Authorization LAHTI_BASIC_AUTH; } -#Vantaa scooter stations (https://en-api.sharingos.com/v1/open_api/index.ashx?t=station_list) +#Vantaa citybike stations (https://en-api.sharingos.com/v1/open_api/index.ashx?t=station_list) location /out/en-api.sharingos.com/ { proxy_pass https://en-api.sharingos.com/; include allowed-ips.conf; @@ -161,6 +161,18 @@ location /out/en-api.sharingos.com/ { proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; } +#Tampere citybike stations (http://pre-openapi.sharingos.com/open_api/index.ashx?t=station_list) +location /out/pre-openapi.sharingos.com/ { + proxy_pass https://pre-openapi.sharingos.com/; + 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; +} + #Matkahuolto kainuu gtfs (https://minfoapi.matkahuolto.fi/gtfs/kainuu-fi/gtfs.zip ) location /out/minfoapi.matkahuolto.fi/gtfs/kainuu-fi/ { proxy_pass https://minfoapi.matkahuolto.fi/gtfs/kainuu-fi/; From e5d8bb33ecf5604ce160019bfe06b871469265ee Mon Sep 17 00:00:00 2001 From: Janne Antikainen Date: Fri, 28 May 2021 14:19:07 +0300 Subject: [PATCH 2/3] Remove s from http. --- external.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external.conf b/external.conf index e8af0d6..e795129 100644 --- a/external.conf +++ b/external.conf @@ -163,7 +163,7 @@ location /out/en-api.sharingos.com/ { #Tampere citybike stations (http://pre-openapi.sharingos.com/open_api/index.ashx?t=station_list) location /out/pre-openapi.sharingos.com/ { - proxy_pass https://pre-openapi.sharingos.com/; + proxy_pass http://pre-openapi.sharingos.com/; include allowed-ips.conf; proxy_cache ext_cache; proxy_cache_valid 200 30s; From c3aab180dcf817e17f41f7ba3e3f501959123813 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Mon, 9 Aug 2021 20:36:58 +0300 Subject: [PATCH 3/3] Change tampere citybike external URL --- external.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external.conf b/external.conf index e795129..f0c557f 100644 --- a/external.conf +++ b/external.conf @@ -161,9 +161,9 @@ location /out/en-api.sharingos.com/ { proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; } -#Tampere citybike stations (http://pre-openapi.sharingos.com/open_api/index.ashx?t=station_list) -location /out/pre-openapi.sharingos.com/ { - proxy_pass http://pre-openapi.sharingos.com/; +#Tampere citybike stations (https://en-admin.sharingos.com/GBFS/1048/en/station_status.json, free_bike_status.json, system_regions.json and system_information.json) +location /out/en-admin.sharingos.com/ { + proxy_pass https://en-admin.sharingos.com/; include allowed-ips.conf; proxy_cache ext_cache; proxy_cache_valid 200 30s;