Rails 3 SSL on Heroku

I am currently developing am e-commerce app in Rails 3.0.9 and it is hosted on Heroku.

Ideally I would like to set 'Hostname based SSL' (http://addons.heroku.com/ssl), but Heroku charges a fee of $20/month which seems a bit steep for me right now.

Heroku does offer a free SSL solution by piggybacking off their certificate, however you would have to use their domain (https://yourapp.heroku.com)

I was thinking I would direct my payment page to this URL and then redirect the user back to my custom URL after the transaction has been processed. The problems I'm have with using this solution are:

  • When you redirect the user back to the custom url after the transaction, my flash message will not be displayed as it is tied to the cookie of the heroku URL. How can I send the flash message back to the custom domain?
  • If the user clicks on any of the menu links on the payment page, they will be sent to a page hosted on the Heroku URL. Since all my links are relative to the root domain. Is there a way of forcing all URLs generated (I am using 'url_for' links in my menu) to use the full custom domain urls?
  • Unless someone can suggest an alternate solution altogether?

    Thanks


    喜欢这个?

    url_for(:only_path => false, :host => 'your-app.heroku.com', :protocol => :https)
    
    链接地址: http://www.djcxy.com/p/60100.html

    上一篇: Heroku Rails应用程序集成了一个Bluehost Wordpress网站

    下一篇: Rails 3 Heroku上的SSL