Skip to content

Commit 0a3bb33

Browse files
committed
Remove removed API endpoints from code
1 parent aed81f2 commit 0a3bb33

File tree

4 files changed

+1
-125
lines changed

4 files changed

+1
-125
lines changed

common.conf

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -29,124 +29,6 @@ location /realtime/trip-updates/v1/FOLI {
2929
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
3030
}
3131

32-
#legacy HSL trip update endpoint that is identical to v2 now
33-
location /realtime/trip-updates/v1/HSL {
34-
proxy_pass https://transitdatadev.blob.core.windows.net/trip-updates/v2/hsl;
35-
proxy_redirect off;
36-
proxy_set_header X-Real-IP $remote_addr;
37-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
38-
# proxy_set_header X-Forwarded-Host $host;
39-
# proxy_cache common;
40-
# proxy_cache_valid 200 30s;
41-
# proxy_cache_lock on;
42-
# proxy_cache_key "$host$request_uri";
43-
# add_header X-Proxy-Cache $upstream_cache_status;
44-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
45-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
46-
}
47-
48-
# used to be "alias" for hslalert, now same as v2
49-
location /realtime/service-alerts/v1/ {
50-
proxy_pass https://transitdatadev.blob.core.windows.net/service-alerts/v2/hsl;
51-
proxy_redirect off;
52-
proxy_set_header X-Real-IP $remote_addr;
53-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
54-
# proxy_set_header X-Forwarded-Host $host;
55-
# proxy_cache common;
56-
# proxy_cache_valid 200 30s;
57-
# proxy_cache_lock on;
58-
# proxy_cache_key "$host$request_uri";
59-
# add_header X-Proxy-Cache $upstream_cache_status;
60-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
61-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
62-
}
63-
64-
location /realtime/service-alerts/v2/hsl {
65-
proxy_pass https://transitdatadev.blob.core.windows.net/service-alerts/v2/hsl;
66-
proxy_redirect off;
67-
proxy_set_header X-Real-IP $remote_addr;
68-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69-
# proxy_set_header X-Forwarded-Host $host;
70-
# proxy_cache common;
71-
# proxy_cache_valid 200 30s;
72-
# proxy_cache_lock on;
73-
# proxy_cache_key "$host$request_uri";
74-
# add_header X-Proxy-Cache $upstream_cache_status;
75-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
76-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
77-
}
78-
79-
location /realtime/trip-updates/v2/hsl {
80-
proxy_pass https://transitdatadev.blob.core.windows.net/trip-updates/v2/hsl;
81-
proxy_redirect off;
82-
proxy_set_header X-Real-IP $remote_addr;
83-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
84-
# proxy_set_header X-Forwarded-Host $host;
85-
# proxy_cache common;
86-
# proxy_cache_valid 200 30s;
87-
# proxy_cache_lock on;
88-
# proxy_cache_key "$host$request_uri";
89-
# add_header X-Proxy-Cache $upstream_cache_status;
90-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
91-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
92-
}
93-
94-
location /realtime/vehicle-positions/v2/hsl {
95-
proxy_pass https://transitdatadev.blob.core.windows.net/vehicle-positions/v2/hsl;
96-
proxy_redirect off;
97-
proxy_set_header X-Real-IP $remote_addr;
98-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
99-
# proxy_set_header X-Forwarded-Host $host;
100-
}
101-
102-
#"alias" for navigator-server
103-
location /realtime/vehicle-positions/v1/ {
104-
rewrite /realtime/vehicle-positions/v1/(.*) /$1 break;
105-
proxy_pass http://navigator-server:8080/;
106-
proxy_redirect off;
107-
proxy_set_header X-Real-IP $remote_addr;
108-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
109-
# proxy_set_header X-Forwarded-Host $host;
110-
# proxy_cache common;
111-
# proxy_cache_valid 200 30s;
112-
# proxy_cache_lock on;
113-
# proxy_cache_key "$host$request_uri";
114-
# add_header X-Proxy-Cache $upstream_cache_status;
115-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
116-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
117-
}
118-
119-
location /realtime/raildigitraffic2gtfsrt/v1/ {
120-
rewrite /realtime/raildigitraffic2gtfsrt/v1/(.*) /$1 break;
121-
proxy_pass http://raildigitraffic2gtfsrt:8080;
122-
proxy_redirect off;
123-
proxy_set_header X-Real-IP $remote_addr;
124-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
125-
# proxy_set_header X-Forwarded-Host $host;
126-
include cors.conf;
127-
# proxy_cache common;
128-
# proxy_cache_valid 200 30s;
129-
# proxy_cache_lock on;
130-
# proxy_cache_key "$host$request_uri";
131-
# add_header X-Proxy-Cache $upstream_cache_status;
132-
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
133-
# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
134-
}
135-
136-
location /map/v1/ {
137-
proxy_pass http://hsl-map-server:8080;
138-
proxy_cache tiles;
139-
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
140-
proxy_cache_key $map_cache_key;
141-
proxy_cache_revalidate on;
142-
proxy_cache_lock on;
143-
proxy_redirect off;
144-
proxy_set_header X-Real-IP $remote_addr;
145-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
146-
# proxy_set_header X-Forwarded-Host $host;
147-
add_header X-Cache-Status $upstream_cache_status;
148-
}
149-
15032
location /map/v2/ {
15133
proxy_pass http://hsl-map-server:8080;
15234
proxy_cache tiles;

run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ sed -i "s/JOJO_BASIC_AUTH/${JOJO_BASIC_AUTH}/" /etc/nginx/external.conf
1010
sed -i "s/LAPPEENRANTA_BASIC_AUTH/${LAPPEENRANTA_BASIC_AUTH}/" /etc/nginx/external.conf
1111
sed -i "s/LINKKI_BASIC_AUTH/${LINKKI_BASIC_AUTH}/" /etc/nginx/external.conf
1212
sed -i "s/NEW_LISSU_BASIC_AUTH/${NEW_LISSU_BASIC_AUTH}/" /etc/nginx/external.conf
13-
sed -i "s/transitdatadev/${HSL_RT_STORAGE_NAME}/" /etc/nginx/common.conf
1413
sed -i "s/LAHTI_BASIC_AUTH/${LAHTI_BASIC_AUTH}/" /etc/nginx/external.conf
1514
sed -i "s/HAMEENLINNA_BASIC_AUTH/${HAMEENLINNA_BASIC_AUTH}/" /etc/nginx/external.conf
1615
sed -i "s/test.hslfi.hsldev.com/${NEW_HSL_FI_URL}/" /etc/nginx/nginx.conf

test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ describe('api.digitransit.fi', function() {
116116
testProxying('api.digitransit.fi','/graphiql/hsl','graphiql:8080');
117117
testProxying('api.digitransit.fi','/realtime/trip-updates/v1/FOLI','siri2gtfsrt:8080');
118118
//testCaching('api.digitransit.fi','/realtime/trip-updates/v1/foo', false)
119-
testProxying('api.digitransit.fi','/realtime/vehicle-positions/v1/','navigator-server:8080');
120-
// testCaching('api.digitransit.fi','/realtime/vehicle-positions/v1/foo',false);
121-
testProxying('api.digitransit.fi','/realtime/raildigitraffic2gtfsrt/v1/','raildigitraffic2gtfsrt:8080');
122-
//testCaching('api.digitransit.fi','/realtime/raildigitraffic2gtfsrt/v1/foo',true);
123-
testProxying('api.digitransit.fi','/map/v1/','hsl-map-server:8080');
124119
testProxying('api.digitransit.fi','/map/v2/','hsl-map-server:8080');
125120
testProxying('api.digitransit.fi','/map/v3/hsl-map/','hsl-map-server:8080');
126121
testProxying('api.digitransit.fi','/map/v3/hsl/ticket-sales-map/','hsl-map-server:8080');

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ echo "$ADDHOSTS"
1616

1717
CONTAINER_ID=$(docker run -d -p 9000:8080 $ADDHOSTS -e VILKKU_BASIC_AUTH="\"test\"" \
1818
-e JOJO_BASIC_AUTH="\"test\"" -e LAPPEENRANTA_BASIC_AUTH="\"test\"" -e LINKKI_BASIC_AUTH="\"test\"" \
19-
-e NEW_LISSU_BASIC_AUTH="\"test\"" -e LAHTI_BASIC_AUTH="\"test\"" -e HSL_RT_STORAGE_NAME=transitdataprod \
19+
-e NEW_LISSU_BASIC_AUTH="\"test\"" -e LAHTI_BASIC_AUTH="\"test\"" \
2020
-e HAMEENLINNA_BASIC_AUTH="\"test\"" -e NEW_HSL_FI_URL=hsl.fi \
2121
-e LMJ_BASIC_AUTH="\"test\"" -e MIKKELI_BASIC_AUTH="\"test\"" \
2222
-e VAASA_BASIC_AUTH="\"test\"" -e SALO_BASIC_AUTH="\"test\"" -e ROVANIEMI_BASIC_AUTH="\"test\"" \

0 commit comments

Comments
 (0)