←back to thread

.localhost Domains

(inclouds.space)
301 points todsacerdoti | 1 comments | | HN request time: 0.208s | source
Show context
jFriedensreich ◴[] No.43644501[source]
Chrome and i think Firefox resolve all <name>.localhost domains to localhost per default, so you don't have to add them to the hosts file. I setup a docker proxy on port 80 that resolves all requests from <containername>.localhost to the first exposed port of that container (in order of appearing in the docker compose file) automatically which makes everything smooth without manual steps for docker compose based setups.
replies(2): >>43644914 #>>43653293 #
globular-toast ◴[] No.43653293[source]
Source for this? Are you sure it's not your system resolver doing it?
replies(3): >>43653487 #>>43656664 #>>43659052 #
1. kbolino ◴[] No.43653487[source]
It's probably both. Browsers now have built-in DoH so they usually do their own resolving. Only if you disable "secure DNS" (or you use group policies) will you fall back to the system resolver anymore.