You really cannot do this on the client side. With a proxy request, there are two separate connections: one between you and the proxy, and the other between the proxy and the backend. You need access to the proxy server and / or the internal server in order to read its log files in order to understand this.
If the server performs redirects instead of proxies, you can see the redirect path using curl -Liwhich follows the redirects and shows all the response headers.
source
share