location / {
proxy_pass http://image_server:8000;
}
In normal case, the proxy server will return image/png. But in other cases (for example out of bandwidth), it will throw application/json (with 200 HTTP) instead of images. So how to only accept images from the proxy, I want to show a 500 error page instead of it returning application/json from the proxy