I was wondering if there is a way to have different proxy_* rules
on the HTTP method? My use case is that I want to be a little more
conservative about what requests I retry for POST requests, as they have
undesired impact if tried twice after a “false” timeout.
e.g., for GET, I may want to try another when I timeout to the back-end
server after 5s, whereas for a POST request, I may want to simply fail
POST request after 15s.
I can work around this by doing specific location blocks for each URL,
having separate defaults based on HTTP method should be easier to
On Fri, Jul 05, 2013 at 08:32:38AM -0400, Branden V. wrote:
I can work around this by doing specific location blocks for each URL, but
having separate defaults based on HTTP method should be easier to maintain.
There is the limit_except directive which might be helpful, see
Thanks for the quick reply Maxim. That looks interesting, though in
particular proxy_next_upstream and proxy_read_timeout don’t report to be
valid in that context. I’ll give it a try, perhaps it’s just an error in
No it doesn’t look like limit_except will allow me to change behaviour
proxy timeouts or next_upstream based on the HTTP method. Are there any
recommendations on how this could be done aside from my workaround?