Skip to content

Proxy environment variables ignored #6321

Open
@benbucksch

Description

@benbucksch

Describe the bug

Axios uses the HTTP proxy, even when it should not.

To Reproduce

Environment

  1. Ubuntu Linux
  2. Proxy set in mate-network-properties
  3. A fresh terminal has environment variables HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy set
  4. The proxy is a most recent squid HTTP proxy

Code snippet

export https_proxy=""
export http_proxy=""
// with proxy, see above
let r = await axios.get("https://www.beonex.com");
console.log("page", r.text());

Expected behavior

  • No proxy is used

Actual result

  • The proxy is used

Axios Version

1.5.1

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

18.15.0

OS

Ubuntu Linux

Additional Library Versions

No response

Additional context/Screenshots

What works

If you set export no_proxy="*", then axios avoids the proxy and it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions