How to hide/restrict log/error message in browser from nginx server

Sergey A. Osokin osa at freebsd.org.ru
Mon Nov 21 13:16:52 UTC 2022


Hi Ashish,

On Mon, Nov 21, 2022 at 06:07:17AM -0500, ashishbijwe wrote:
[...]

> So any http request was made it provides verbose nature of error message in
> browser , it shows some source code file pat below (currently pasted dummy
> browser response): 
> 
> at decodeURIComponent (<anonymous>)
>     at decode_param (/fdsfsdfdfdsf/layer.js:172:12)
>     at Layer.match (/fdsfsdfdfdsf/router/layer.js:123:27)
>     at matchLayer (/fdsfsdfdfdsf/index.js:587:18)
>     at next (fdsfsdfdfdsf/index.js:226:15)
>     at csrf (fdsfsdfdfdsf/index.js:117:5)
>     at /fdsfsdfdfdsf/security.js:128:17
>     at Layer.handle [as handle_request] (/fdsfsdfdfdsfr/layer.js:95:5)
> 
> So my question is is there any way i can hide/restrict this with nginx.conf
> file modification or server configuration files modification

It seems like the issue is related to a backend application behind
nginx, and if that the case it's possible to configure nginx to
intercept a proxy response with the proxy_intercept_errors directive,
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors

Hope that helps.

-- 
Sergey A. Osokin



More information about the nginx mailing list