flow
flow copied to clipboard
Proxy Configuration uses NOPROXY Environment Variable instead of NO_PROXY
Description of the bug
I'm behind a cooperate proxy. But the nodejs is mirrored on an internal server which doesn't need the proxy and is not accessible by the proxy.
The build process on the jenkins sets the following env variables: NO_PROXY (contains the internalserver) HTTP_PROXY (the cooperate proxy) HTTPS_PROXY (the cooperate proxy)
In the plugin configuration I set the nodeDownloadRoot to internal server.
When running the build, the download fails because it tries to access the server through the proxy which fails.
If I change the NO_PROXY to NOPROXY it works as exspected.
According to internet, for example https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/ the correct name of the variable is NO_PROXY instead of NOPROXY.
The affected file is https://github.com/vaadin/flow/blob/5d1914cc40246917fcfad69abda947e4e9ab3159/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java#L129
Expected behavior
If a host is in the env variable NO_PROXY no proxy should be used to access that host
Minimal reproducible example
I have no code snippet, because it relies on the network configuration
- Put nodejs on a server that is not accessible by a specific proxy
- configure HTTP_PROXY and HTTPS_PROXY to that specific proxy
- set NO_PROXY to server with nodejs
- set the nodeDownloadRoot so that it works with that server
- run vaadin:prepare-frontend
Versions
- Vaadin / Flow version: 22.3.0
- Java version: 11
- OS version: Windows 10 (git bash) and Linux
Seems like NO_PROXY is the most used form. We may need to also support NOPROXY for backward compatibility
Would be great if you could fix it.