如何阻止本地主机 http://localhost 切换到 https://localhost

How to stop localhost http://localhost from switching to https://localhost

我正在编写 Web 应用程序,http://localhost:3000 正在重定向到 https://localhost:3000

一个月前我写完另外两个应用程序时还没有发生这种情况。在过去的一个月里,我从使用 Sinatra 到使用 Rails,尽管我之前使用过 Rails,没有任何这些问题。

我该怎么做才能停止这种强制切换?

这可能是你的浏览器的问题,因为你在HTTPS地址访问了应用程序,它会自动切换到HTTPS版本的网站。

Here you have more information for Firefox,但是解决方法是更改​​设置,将browser.urlbar.autoFill设置为false。其他选择可能是清除历史记录。