Feature #974
closedwould like something similar to nginx proxy_intercept_errors
Description
nginx has a neat feature in which it can intercept responses with HTTP status code of 400 and higher
http://wiki.codemongers.com/NginxHttpProxyModule#proxy_intercept_errors
The error page handler allows one to change the response status code also
http://wiki.codemongers.com/NginxHttpCoreModule#error_page
here's how one would would redirect 4xx/5xx responses from backend
error_page 401 402 404 /40x.html;
location /40x.html {
root /errors/ ;
}
error_page 502 503 504 /50x.html;
location /50x.html {
root /errors/ ;
}
upstream backend {
server backend2.example.com:8080;
}
location / {
proxy_intercept_errors on;
proxy_pass backend
}
Updated by gstrauss almost 8 years ago
- Description updated (diff)
- Status changed from New to Patch Pending
- Assignee deleted (
jan) - Target version set to 1.4.46
Updated by gstrauss over 7 years ago
- Status changed from Patch Pending to Fixed
- % Done changed from 0 to 100
Applied in changeset 8f651a2b305f638ff2abec93a04a9ef2d967242a.
Also available in: Atom