Nginx proxy_intercept_errors
Kiril Kalchev
kirilk at cloudxcel.com
Wed Mar 6 14:45:33 UTC 2013
Just for the record, I think I found a kind of solution. It looks good if my backend returns http codes 3xx. I have tried with 333 and 334 and it looks great. I know it is an ugly hack, but my findings may help to other poor souls. I hope this behavior will not change in the next versions.
Regards,
Kiril
On Mar 6, 2013, at 4:31 PM, Maxim Dounin wrote:
> Hello!
>
> On Wed, Mar 06, 2013 at 04:02:30PM +0200, Kiril Kalchev wrote:
>
>> Is there any way to force nginx to read request body? I really
>> don't care about this overhead, I hit connection limit much more
>> faster. Thank you for the super fast answer.
>
> No, there is no way to force nginx to read response body - errors
> interception happens right after reading response headers and
> before the body is read. (Well, you may configure another proxy
> layer without intercept errors, but this probably doesn't counts
> as a real solution to what you are trying to do.)
>
> On the other hand, if you have only 403/404 responses you want to
> intercept - you may force your backend to return only headers by
> using
>
> proxy_method HEAD;
>
> in your config (see http://nginx.org/r/proxy_method).
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3565 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130306/a4a93030/attachment.bin>
More information about the nginx
mailing list