You are on page 1of 1

upstream f1-api5 {

zone api_backends 64k;


server 10.1.3.247:80;
}

server {
status_zone f1_api;
listen 8085;

location /api {
api;

location /api/f1 {
location = /api/f1/seasons.json {
status_zone seasons;
proxy_pass http://f1-api;
}}

location ~/api/f1/[12][0-9]+ {
status_zone year;
proxy_pass http://f1-api;
}

location /api/f1/drivers {
status_zone drivers;
proxy_pass http://f1-api;
}

location =/dashboard.html {
root /usr/share/nginx/html;
}

include conf.d/my_apis/*.conf;

#invalid resource
location / {
return 400;
}

#error responses
default_type application/json;

error_page 400 = @400;


location @400 {
return 400 '{"status":400,"message":"Bad Request"}\n';
}
}

You might also like