Re: How to get response body when using proxy_intercept_errors

2020-07-14 Thread Desiree Valdez
Stop emails to me On Tue, Jul 14, 2020, 6:13 AM Maxim Dounin wrote: > Hello! > > On Tue, Jul 14, 2020 at 04:25:46AM -0400, salmanpskply wrote: > > > I have a requirement where when proxied response error code is 401 > > (condition #1) and response body has text "SAML Token Expired" (condition >

Re: How to get response body when using proxy_intercept_errors

2020-07-14 Thread salmanpskply
Thank you Posted at Nginx Forum: https://forum.nginx.org/read.php?2,288683,288693#msg-288693 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: How to get response body when using proxy_intercept_errors

2020-07-14 Thread Maxim Dounin
Hello! On Tue, Jul 14, 2020 at 04:25:46AM -0400, salmanpskply wrote: > I have a requirement where when proxied response error code is 401 > (condition #1) and response body has text "SAML Token Expired" (condition > #2), I need to intercept it and redirect to refresh token API. > > I could do it

How to get response body when using proxy_intercept_errors

2020-07-14 Thread salmanpskply
I have a requirement where when proxied response error code is 401 (condition #1) and response body has text "SAML Token Expired" (condition #2), I need to intercept it and redirect to refresh token API. I could do it partially where only error code 401 is considered. Not able to find a way to rea