大礼包:关闭SSL重定向/管理员恢复网站(Spree: Turning off SSL redire

2019-09-19 17:56发布

我设置一个新的Rails应用程序,安装了大礼包宝石(1.1.2),并能顺利拿到狂欢起来,但是运行我没有SSL证书和我只是希望与狂欢勾搭之前,我购买证书,等我可以成功地显示大礼包页面,会显示产品等,但是当我去/管理其重定向到该网站的主页。 这就是日志显示:

Started GET "/admin" for 76.122.36.219 at Wed Jul 18 15:25:42 -0500 2012
Processing by Spree::Admin::OverviewController#index as HTML
Redirected to http://**************.com/
Completed 302 Found in 139ms (ActiveRecord: 5.1ms)

我已经更新了配置/初始化/ spree.rb包括

config.allow_ssl_in_production = false

因此,它不使用SSL。

这里是我的耙约

About your applications environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.6.2
Rack version              1.4
Rails version             3.2.6
JavaScript Runtime        therubyracer (V8)
Active Record version     3.2.6
Action Pack version       3.2.6
Active Resource version   3.2.6
Action Mailer version     3.2.6
Active Support version    3.2.6
Middleware                ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x70d884a28a50>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport
Application root          /home/********/**************
Environment               development
Database adapter          mysql2
Database schema version   20120718173536

我一直试图寻找无果; 大部分东西我发现讨论的开/关分期转向SSL。 如果有帮助,我的服务器使用的Phusion客运部署(Site5)..

任何帮助或方向将不胜感激! 谢谢!

Answer 1:

搜索更多一些后,我找到了问题的答案在这里 。

基本上你只需要安装其他宝石称为spree_auth_devise 。



文章来源: Spree: Turning off SSL redirects /admin back to site