Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A workaround for SSL on Heroku

Got an app running great on Heroku, only issue is that their custom-domain SSL solution is way expensive (http://docs.heroku.com/ssl), leaving piggybacking of their *.heroku.com as an only viable option. The good thing is that my app only requires SSL for a couple of pages (for ordering). Right now, I use "ssl_required" in my controller for those couple actions. Any idea on how to create a before_filter that would bump the user to https://myapp.heroku.com just for those two actions and redirect to http://www.myapp.com for anything else? Ugly ugly, but seems like the best way to go for now.

like image 668
Newy Avatar asked Dec 14 '09 19:12

Newy


1 Answers

You could hack/monkey-patch: SSL Requirement plugin (github.com/rails/ssl_requirement), so that it redirected to different hosts.

BTW if you plan to host multiple applications, they can share one multi-domain certificate (and one pricey SSL Addon). Here's more detailed description: http://wojciech.oxos.pl/post/277669886/save-on-herokus-custom-ssl-addons

like image 128
Wojtek Kruszewski Avatar answered Oct 18 '22 04:10

Wojtek Kruszewski