I ended up deploying a haproxy container that forwards to where I want things to go, and then I point my proxy configuration to that container.
My proxy would point at http://localhost:4444
and my container command is:
docker run -d --name haproxy -p 4444:80 -v /Path/To/Folder/hap-conf:/usr/local/etc/haproxy:ro --sysctl net.ipv4.ip_unprivileged_port_start=0 haproxy:2.3
This requires you to create a hap-conf
folder somewhere on your computer, with a haproxy.cfg
file inside of it with the following:
global
ssl-default-bind-options ssl-min-ver TLSv1.2
defaults
mode http
maxconn 10000
timeout connect 5000
timeout check 5000
timeout client 300000
timeout server 300000
frontend http-in
bind *:80
mode http
log global
log 127.0.0.1 local0
option httplog
default_backend main
backend main
default-server inter 3s fall 3 rise 2
server server-name server-name:8443 check ssl verify none
Then I just change the server-name
to repoint at things, and if I need to point at something on my local computer I just use a line like:
server localhost host.docker.internal:8443 check ssl verify none
Then its just a matter of updating the haproxy.cfg
, restarting the container and refreshing your browser.
Not as convenient as a hot-reloadable proxy settings from Angular but for myself where I have to work on an angular app that takes 10 minutes to start, it saves a lot of time.