We're trying to understand how to set up a proxy server for our Web application. We need several processes to access the Internet through a proxy server in the internal network. Ideally, we could run custom Python code somewhere inside the proxy - especially before actually executing the request.
Clarification based on comments: We are not trying to just use the proxy: we want to run custom code in the proxy to keep track of the request - response process.
This is probably a really basic / dumb question, but now that I know that we should probably use a proxy, I am struggling to understand how they work and how we should incorporate them to our infrastructure.
We would need to do things like modify the requested URL before it's fetched, modify request headers and payload and possibly get some of the response data after the payload has been fetched.
Thanks very much! Any information on this will be very appreciated!