开发者

SSL configuration

I am trying to setup the ssl_requirement plugin. For my users controller I would like to require ssl for new and create. When I open users/new the browser redirects to https but I get an unable to connect error message. The application error log says :

Filter chain halted as [:ensure_proper_protocol] rendered_or_redirected.

I am not sure if I have configured the plugin incorrectly or if I made an err开发者_运维百科or with the nginx configuration.


Make sure your form_for uses a secure url:

form_for @user, :url => user_path(:secure => true)


That sounds like what you should be seeing. The request was recognized as an http request and was redirected to be served over https.

If you're on your development machine, it's going to redirect you to https://localhost/rest_of_url, so if you don't have a server running on your machine on port 443, then it's going to throw an error.

Is your browser not getting redirected?


It looks like when I installed nginx through passenger I did not get the ssl module. I went back and installed nginx from source on it own.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜