开发者

Rails Checkout SSL heroku

开发者 https://www.devze.com 2023-02-02 08:33 出处:网络
I have my app deployed with heroku and have a SSL configured to one of my subdomain(secure.mydomai开发者_JAVA技巧n.com). Iwould like only order part of my app to use this ssl so in my orders controlle

I have my app deployed with heroku and have a SSL configured to one of my subdomain(secure.mydomai开发者_JAVA技巧n.com). I would like only order part of my app to use this ssl so in my orders controller I have a before filter to redirect the request to my secure subdomain. However all the session information is lost when it is redirected. I think because of the subdomain. How do I redirect this so that session information (cart info which is stored in db and some id information) can be retrieved. Can some one help please.

THanks KIran


In your config/intializers/session_store.rb change it to

Yourapp::Application.config.session_store :cookie_store, :key => '_yourapp_session', :domain=>:all 

The secret-sauce is the domain... When set to all, cookies will be stored across all subdomains and the main domain.

0

精彩评论

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