Closed
Description
I'm using a PAC (proxy auto-config) file to redirect all domains ending with .local
to a local development proxy without messing around with my hosts file.
This seems to don't play well when using the HOST
environment variable in cra.
Settings DANGEROUSLY_DISABLE_HOST_CHECK
to true
has no effect.
Environment
node -v
: v8.9.0npm -v
: 4.0.5yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts
(if you haven’t ejected): 1.0.17
Then, specify:
- Operating system: Windows 10
Steps to Reproduce
- Configure a URL to an PAC file with the following content:
function FindProxyForURL (url, host) {
if (dnsDomainIs(host, '.local')) {
return 'PROXY 127.0.0.1:2000';
}
return 'DIRECT';
}
- Setup an reverse proxy (nginx, whatever) to listen on port 2000 with a
.local
domain configured with the cra dev server as target. - Configure
HOST
to your.local
domain. - Try to start cra. It gets stuck for some time before showing the above error.