简体   繁体   English

我的Rails应用正在生产模式下从http自动重定向到https

[英]My rails app is auto redirecting to https from http in production mode

My Rails application is working fine on dev mode. 我的Rails应用程序在开发模式下运行良好。 In production mode the localhost:3000 is also opening nicely(with http), but on clicking signup link, 在生产模式下,localhost:3000也可以很好地打开(使用http),但是在单击注册链接时,

it's auto redirecting to "https://localhost/signup".

In production.rb file, i have marked 在production.rb文件中,我已标记

config.force_ssl = false 

still it's auto redirecting to https from http. 仍然会自动从http重定向到https。

Few links are working fine, where as in others the url is appended with https and no content is visible. 很少有链接能正常工作,在其他链接中,URL后面附加有https,并且看不到任何内容。 There is no trace in log/terminal for this issue. 在日志/终端中没有此问题的跟踪。 I am using Rails 4. 我正在使用Rails 4。

Do this to find out if you are enforcing HTTPS in your controller or routes. 这样做可以确定您是否在控制器或路由中实施了HTTPS。

$ git grep force_ssl app/controllers
$ git grep https config/routes.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails SSL要求插件 - 在重定向到https之前,不应检查您是否处于生产模式? - Rails SSL Requirement plugin — shouldn't it check to see if you're in production mode before redirecting to https? Rails redirect_to是从https(正确)重定向到http(不正确)? - Rails redirect_to is redirecting from https (correct) to http (incorrect)? 生产模式和资产管道中断rails杀死了我的应用程序 - rails broken on production mode and asset pipeline kills my app 在Rails的生产模式下响应HTTP请求 - Response to HTTP request at production mode in rails 在开发模式下如何在Rails应用程序上工作,而在生产模式下将其推送? - How do I work on my Rails app in development mode, but push it in production mode? 在生产模式下运行Ruby on Rails App时出错 - Error Running Ruby on Rails App in Production Mode Rails:部署第一个应用程序 - 生产模式 - Rails : deploying first app - production mode Rails4:如何在生产中使用HTTP而不是HTTPS(SSL) - Rails4: How to use HTTP instead of HTTPS (SSL) in production 我的Rails 4.2.5应用服务器在开发模式下一直连接到生产db而不是开发db - My rails 4.2.5 app server keeps connecting to production db instead of development db in development mode 在我的 rails 3 应用程序中,simple_captcha 在生产模式下不显示图像 - In my rails 3 app, simple_captcha doesn't display image on production mode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM