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

An option to disable proxy in Deno.CreateHttpClientOptions #28385

Open
denis-migdal opened this issue Mar 4, 2025 · 1 comment
Open

An option to disable proxy in Deno.CreateHttpClientOptions #28385

denis-migdal opened this issue Mar 4, 2025 · 1 comment

Comments

@denis-migdal
Copy link

Hi,

Sometimes we have a computer behind a proxy, and we want to send queries to localhost.
However, when the http_proxy environment variable is set, such requests are sent to the proxy... (which is also a security issue...).

Could it be possible to add an option to Deno.CreateHttpClientOptions, in order to disable the system's proxy ?

This could be one of the following (I do not know which one would be the best):

Deno.createHttpClient({ proxy: null });
Deno.createHttpClient({ proxy: false });
Deno.createHttpClient({ use_proxy: false });
Deno.createHttpClient({ noproxy: true });
Deno.createHttpClient({ proxy: {url: null} });

Cordially,

@lucacasonato
Copy link
Member

This seems reasonable. I think we should support:

Deno.createHttpClient({ proxy: "inherit" }); // default, what we already do when proxy is not set
Deno.createHttpClient({ proxy: "disable" }); // new behaviour being requested
Deno.createHttpClient({ proxy: { url: "..." } }); // existing behaviour, use a different proxy

A PR would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants