DEV Community

Cover image for Firefox and Chrome resolve any localhost domain (*.localhost) to loopback address

Firefox and Chrome resolve any localhost domain (*.localhost) to loopback address

Kamal Mustafa on May 24, 2021

I was reading this reddit's thread and this comment caught my interest:- Chrome and Firefox also consider "*.localhost" as secure so you can deve...
Collapse
 
k4ml profile image
Kamal Mustafa

Did some more digging (git blame) and turned out this was added 7 months ago.

github.com/mozilla/gecko-dev/commi...

The context of this commit also interesting as it allow the browser to trust .localhost as secure origin and you don't need https in local dev for stuff that require https before, such as service workers.