How to show the path that a curl request requires?

I have a setting where the request is sent from servers x->y->z, where yit can be considered as a reverse proxy. When I do a curlin y, I want to see the request go from x to y to z. This is something that will do traceroute.

How can I address the ip addresses that my requests bounce to reach my final destination?

+5
source share
1 answer

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.

0
source

All Articles