Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 除了rails3中的1之外,所有包含https的URL_Ruby On Rails_Ssl - Fatal编程技术网

Ruby on rails 除了rails3中的1之外,所有包含https的URL

Ruby on rails 除了rails3中的1之外,所有包含https的URL,ruby-on-rails,ssl,Ruby On Rails,Ssl,使用config.force_ssl=true的Rails配置设置就像一个符咒,使所有url都带有https,但是有可能有一个特定的url没有https吗 提前感谢。请参阅 类内容控制器:索引 很酷,谢谢!,顺便说一句,配置/路由使用:协议到一个特定的路由器也做到了这一点。此外,请确保http页面上指向https页面的所有链接都具有:协议=>“https”。例如,链接到(“登录”,登录url(:protocol=>'https')。否则,您将获得不必要的重定向。相反,请确保指向http页面的链接

使用config.force_ssl=true的Rails配置设置就像一个符咒,使所有url都带有https,但是有可能有一个特定的url没有https吗

提前感谢。

请参阅

类内容控制器:索引

很酷,谢谢!,顺便说一句,配置/路由使用:协议到一个特定的路由器也做到了这一点。此外,请确保http页面上指向https页面的所有链接都具有:协议=>“https”。例如,链接到(“登录”,登录url(:protocol=>'https')。否则,您将获得不必要的重定向。相反,请确保指向http页面的链接具有:protocol=>'http'。使用路径帮助程序而不是*\url帮助程序,并且在不使用:protocol时,您不必担心不必要的重定向
class ThingsController < ApplicationController
  force_ssl :except => :index