Skip to content

Requests not being forwarded via corporate proxy #5876

@bengrah-miller

Description

@bengrah-miller

I've put together an ExpressJS proxy server, that uses http-proxy-middleware - the user will make a request to our proxy server, which will then make a subsequent request to the destination that we want to go to. The proxy server works fine, but only when I'm working from home, but does not work when I'm in the office.

We have a corporate proxy that is set up on all workstations, and my installed Node instance has both https-proxy and proxy config settings set up as you can see below:

PS C:\MobileDevTesting\express-server2> npm config list
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
; "global" config from C:\Program Files\nodejs\etc\npmrc

; https-proxy = "http://prox.org.com:9090/" ; overridden by user
; proxy = "http://prox.org.com:9090/" ; overridden by user 

When I use the proxy server from home, works great - no issues, but does not work in the office. My colleague has confirmed that the request does not appear to be going through our proxy (http://prox.org.com:9090), and is just trying to go directly to the internet. This request is then blocked by our firewall.

I had assumed that because we had set up the proxy and https-proxy settings in Node, that that would handle this itself but appears not to be the case. We cannot also whitelist the address of the request as it changes regularly.

Is this the correct behaviour from Node/ExpressJS? Is there a setting I can use to force going through the corporate proxy that I've not used yet? I may also be barking up the wrong tree as well, but any guidance/help you could give would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions