I have trouble enabling ssl for my application.
I tried various gems/solutions and none of them work. Here is the list:
- Rails 3 SSL Deprecation
- http://collectiveidea.com/blog/archives/2010/11/29/ssl-with-rails/
- (and some others but I can only post 2 hyperlinks.)
I've made sure I removed all the code from my previous attempt.
What do I want
I want the whole (Rails3) application to run trough SSL/HTTPS. I've read a number of articles that explain this and tried various solutions (see above).
So what is the problem:
Currently I use the rails 3 bartt/ssl_requirement gem and the problem is that some of the url's go to a [http://example.com:443 page]. Which result in an page-removed-error. At the same time other url's are fine and go to [https://example.com] and they work. These url's which i'm talking about are all from within the same controller which is ssl_forced/ssl_required/whatever. I even tried to contraint all the routes with :protocol => 'https', but that resulted in endless-redirects.
I use the bartt/ssl_required atm because the url's don't result in endless-redirect-errors, which I got with some other gems/solutions.
I don't get it... I understand that every encrypted-url goes trough the port 443, but I don't recall seeing any http/https url's with the port straight in it.
What causes this strange url behavior within the same controller? Is it because some are named-routes? How do I :constraint them then, because I fail to get this thing working.