nginx returns html instead of json response

Kaushal Shriyan kaushalshriyan at gmail.com
Thu Nov 17 01:17:52 UTC 2022


On Thu, Nov 17, 2022 at 3:13 AM Sergey A. Osokin <osa at freebsd.org.ru> wrote:

> On Wed, Nov 16, 2022 at 10:29:04PM +0530, Kaushal Shriyan wrote:
> > Checking in again if someone can help me with my earlier post to this
> > mailing list? Thanks in advance.
>
> I'd recommend to take a look on the proxy_intercept_errors directive [1],
> it helps to intercept 300+ error codes and processing with the error_page
> directive [2].
>
> References
> 1.
> https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors
> 2. http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page
>
> Hope that helps.
>
> --
> Sergey A. Osokin
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org


Thanks Sergey for the email and appreciate it. I will go through the link
below and keep you updated. Thanks in advance.

1.
https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors
2. http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page

Best Regards,

Kaushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20221117/91bc908c/attachment.htm>


More information about the nginx mailing list