Is your feature request related to a problem? Please describe.
Components that use the confighttp to initialize an HTTP Client are not able to define the maximum number of redirection the client should perform. The provided client uses the default CheckRedirect http configuration:
// If CheckRedirect is nil, the Client uses its default policy,
// which is to stop after 10 consecutive requests.
Is your feature request related to a problem? Please describe.
Components that use the
confighttp
to initialize an HTTP Client are not able to define the maximum number of redirection the client should perform. The provided client uses the defaultCheckRedirect
http configuration:Use case: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34623
Describe the solution you'd like
Configuration option to limit the number of redirections, if non provided, the client should continue to work as it is (default redirections)