Skip to content

Commit 8e823f6

Browse files
reverse proxy: OJP endpoint (public-transport#2039)
1 parent 22aceda commit 8e823f6

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

ansible/roles/nginx/templates/transitous.conf.j2

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ server {
8282

8383
limit_req zone=api_harmless burst=100 delay=50;
8484

85+
proxy_connect_timeout 2s;
86+
proxy_send_timeout 60;
87+
proxy_read_timeout 60;
88+
send_timeout 60;
89+
8590
proxy_cache motis;
8691
proxy_cache_valid 200 302 1d;
8792
proxy_cache_valid 404 1s;
@@ -90,6 +95,18 @@ server {
9095
add_header Cache-Control "public, max-age=36000";
9196
}
9297

98+
# OJP endpoint
99+
location /ojp20 {
100+
proxy_pass http://{{ item.vhost }}-backend/ojp20;
101+
102+
limit_req zone=api burst=40 delay=10;
103+
104+
proxy_connect_timeout 2s;
105+
proxy_send_timeout 60;
106+
proxy_read_timeout 120;
107+
send_timeout 60;
108+
}
109+
93110
# Rate limit plan API
94111
location ~ ^/api/(v1|v2|v3|v4|v5|v6|experimental)/(plan|one-to-all) {
95112
proxy_pass http://{{ item.vhost }}-backend$uri?$args;
@@ -114,7 +131,7 @@ server {
114131
send_timeout 60;
115132
}
116133

117-
# MOTIS
134+
# other endpoints
118135
location /api/ {
119136
proxy_pass http://{{ item.vhost }}-backend/api/;
120137

0 commit comments

Comments
 (0)