Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure HttpClient to use Default System Proxy #2416

Open
John0King opened this issue Feb 23, 2024 · 1 comment
Open

How to configure HttpClient to use Default System Proxy #2416

John0King opened this issue Feb 23, 2024 · 1 comment
Labels
Type: Documentation Improvements or additions to documentation
Milestone

Comments

@John0King
Copy link

John0King commented Feb 23, 2024

Some details

In this doc https://microsoft.github.io/reverse-proxy/articles/http-client-config.html#httpclient is shows a way to configure a WebProxy, but not mention how to just set the HttpClientHandler.UseProxy to true,
I use a custom configuration to set it to use system proxy for fiddler debugging

                .ConfigureHttpClient((c, h) =>
                {
                    
                    h.UseProxy = true;
                })

and I hope I can use the build in configuration for that

@John0King John0King added the Type: Feedback This issue is general feedback and doesn't represent actionable work. label Feb 23, 2024
@MihaZupan
Copy link
Member

This seems like something we could call out in the docs - The default ForwarderHttpClientFactory will set UseProxy to false, so if you want to use the default proxy (not a manually specified one from the config), you can flip it back to true.

Another similar case with fiddler: #1477 (comment)

I don't remember actually discussing why the default of disabling UseProxy was chosen though.

@MihaZupan MihaZupan added Type: Documentation Improvements or additions to documentation and removed Type: Feedback This issue is general feedback and doesn't represent actionable work. labels Feb 27, 2024
@MihaZupan MihaZupan added this to the Backlog milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants