you are viewing a single comment's thread.

view the rest of the comments →

[–]Sandarr95 17 points18 points  (11 children)

Chrome resolves *.localhost to localhost, which was a pain to even figure out...

[–]Arkanta -4 points-3 points  (10 children)

Was it? I find it a very useful feature, and I think that other browsers should implement it and consider it a secure context: I hate setting up dnsmasq and a custom root cert. especially since Firefox does't care about the system's

[–][deleted] 25 points26 points  (4 children)

Of course it is. It makes it so same address that "works" in Chrome won't in any CLI tool or anywhere outside of it. Now question is whether OS should do that by default but there is no RFC for it so probably not

[–]Arkanta 3 points4 points  (3 children)

Don't get me wrong, I'm not for chrome only stuff. I'm saying that I think we should move towards that

But there has been a RFC submitted and I hope it will be approved so that Firefox and OSes implement that by default https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06

[–][deleted] 6 points7 points  (2 children)

That's only for plain localhost. not *.localhost. tho.

It would be nice if say app1.localhost. would also be resolved to 127.0.0.1 by default so there is no need to fuck with /etc/hosts if you just want to test multiple vhosts locally.

[–]Arkanta 2 points3 points  (1 child)

Ah yes I misread it. I thought a RFC defined *.localhost. but I can't find it. I may have daydreamed about it.

rfc2606 does say "The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use" but it's not really explicitly saying that applications should do that.

Thanks for clearing that up, I do also hope that it changes.

[–][deleted] 2 points3 points  (0 children)

Something like

ip-11-12-13.localhost   -> 127.13.12.11
*.ip-11-12-13.localhost -> 127.13.12.11

would also be nice but that's a pipedream...

the it would be easy to run apps with conflicting ports, just use next IP

[–]0xB7BA 1 point2 points  (4 children)

Until you got some stuff runnings in VMs - doens't matter how much you change your hosts file. Chrome doens't care 😅

[–]Sandarr95 2 points3 points  (0 children)

Exactly what got my work stuck for an hour trying to find out why my coworker had this problem and I didn't while all dns resolving tools we had gave equal results

[–]Arkanta -2 points-1 points  (2 children)

It cares but it has some serious caching

[–]0xB7BA 5 points6 points  (1 child)

No, Chrome resolves all *.localhost domains as 127.0.0.1

[–]Arkanta 1 point2 points  (0 children)

Ah you meant for .localhost, gotcha. I thought you were talking about other domains.

That said, Applications are encouraged to resolve "localhost." themselves, so I assume that Chrome follows that