Add logging to smart proxy requests (ProxyAPI)
|Assigned To:||Dominic Cleal|
|Found in release:||Pull request:||https://github.com/theforeman/foreman/pull/3683, https://github.com/theforeman/foreman/pull/4702|
|Velocity based estimate||-|
We should add a new logger for debugging smart proxy traffic and requests going via ProxyAPI.
Perhaps inside ProxyAPI classes themselves, or something like RestClient.log (so long as it doesn't duplicate compute resource logging, e.g. with oVirt).
fixes #10982 - configure RestClient log to 'proxy' logger
Request/response information is sent to the proxy logger, showing the
URLs called, headers, request body etc.
The X-Request-ID header is now also set in the proxy requests to a
random ID stored in the session, to prevent the user's real session ID
being hijacked from the proxy request data. The ID should be correlated
against the proxy logger.