Setup caddy as a reverse proxy and it will automatically inject a local CA cert into your browsers and auto provision local SSL certs too so you can access local services by names instead of ports, and everything happily works with SSL automagically.
I really, really wish windows and mac had a similar behavior to just route all *.localhost queries to localhost.