# Problem with http -\> https redirect

**URL:** <https://www.ruby-forum.com/t/problem-with-http-https-redirect/107083>\
**Category:** Rails\
**Created:** [June 17, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/problem-with-http-https-redirect/107083 "2007-06-17T23:41:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie\_caroff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Post date:** [June 17, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/problem-with-http-https-redirect/107083/1 "2007-06-17T23:41:23Z")

</div>

Hi,

I have ssl working on my server. When I set all my views to  
ssl\_allowed in my controller, I can switch the http to https in my  
address line, and every page works right.

But when I set all my views to ssl\_required, my page goes into an  
endless redirect, with this message scrolling through the  
production.log:

Filter chain halted as  
[#\<ActionController::Filters::ClassMethods::SymbolFilter:0x9be6050  
@filter=:ensure\_proper\_protocol\>] returned false

Any ideas?

Charlie

---

<div class="post-metadata">

**Author:** ![charlie\_caroff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Post date:** [June 18, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/problem-with-http-https-redirect/107083/2 "2007-06-18T15:14:05Z")

</div>

What web server are you using? It’s possible that the headers Rails  
uses to determine that a request is SSL are not being set.

–  
Benjamin C.  
[http://www.bencurtis.com/](http://www.bencurtis.com/) – blog  
[http://agilewebdevelopment.com/rails-ecommerce](http://agilewebdevelopment.com/rails-ecommerce) – build e-commerce  
sites with Rails

---

<div class="post-metadata">

**Author:** ![charlie\_caroff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Post date:** [June 18, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/problem-with-http-https-redirect/107083/3 "2007-06-18T18:05:32Z")

</div>

I’m using Apache 2.2, and I have it working ok now. The problem was  
that I did not have ssl\_required for all the actions in one of my  
controllers.

What happened was that one of the important actions was not under ssl,  
and I guess in that case the application keeps trying to redirect to  
ssl, but it keeps failing.

Ok for now. Thanks for the response.

Charlie
