[英]Rails application (localhost) automatically redirecting to HTTPS
I've been playing with HTTPS in a local rails application using the 'answer' from the following question: Configuring WEBrick to use SSL in Rails 4 我一直在使用以下问题的“答案”在本地Rails应用程序中使用HTTPS:将WEBrick配置为在Rails 4中使用SSL
So i was running rails via a 'second /bin/rails_temp file and the https was working 所以我正在通过'second / bin / rails_temp文件运行rails,并且https正在工作
now going back to my original rails file and just running 'rails s' I get redirected to https for everything 现在回到我的原始rails文件,只运行'rails s',我将所有内容重定向到https
I've tried clearing cache in browsers, loading new browsers, removing /tmp/ contents 我尝试清除浏览器中的缓存,加载新的浏览器,删除/ tmp /内容
Totally lost! 完全迷路了!
Are you forcing SSL anywhere in your application? 您是否在应用程序中的任何地方强制使用SSL?
For example config.force_ssl = true
例如config.force_ssl = true
Perhaps changing the port would affect the behaviour? 也许更改端口会影响行为?
:Port => 3000, # Specify the port here
Perhaps your laptop is caching the state of the server so changing it's address (using /etc/hosts
) would help? 也许您的笔记本电脑正在缓存服务器的状态,所以(使用/etc/hosts
)更改其地址会有所帮助?
127.0.0.1 sslapplication.local
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.