Can Firefox 76 be forced to consider .localhost subdomains as Secure Context without tls?

故事扮演 提交于 2020-12-06 03:03:01

问题


We are using .localhost domains for development of our applications, and we have multiple applications living at different domains. We are at point where we need to test features requiring pages to execute in Secure Context, i.e. Service Workers and Push API.

Google Chrome for a past few versions has been marking all sites coming from .localhost domain as Secure Context, allowing local, hassle-free testing of Service Workers, Push API, etc.

I cannot find a way to force Firefox 76 to consider same pages being from Secure Context.

We have managed to resolve all .localhost addresses correctly to 127.0.0.1 in all browsers using local dns-resolver settings or built-in browser behaviours.

Firefox config entry network.dns.localDomains does not seem to affect if site is considered to be in Secure Context.

There seems to be some kind of FF internal development to change that behaviour out-of-the box, but it's hard to say when it will be merged and released, and if all pages in *.localhost will be considered Secure Context for sure:
https://bugzilla.mozilla.org/show_bug.cgi?id=1220810

来源:https://stackoverflow.com/questions/61867895/can-firefox-76-be-forced-to-consider-localhost-subdomains-as-secure-context-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!