←back to thread

.localhost Domains

(inclouds.space)
301 points todsacerdoti | 1 comments | | HN request time: 0.201s | 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. jFriedensreich ◴[] No.43659052[source]
Pretty sure its hard coded in the browser and never touches any resolvers. It does not work the same in safari for example.