Rails Checkout SSL heroku

I have an application deployed using heroku and configured SSL for one of my subdomains (secure.mydomain.com). I would only like to order part of my application to use this ssl, so in my order controller I have a filter before reconfiguring the request to my secure subdomain. However, all session information is lost when redirecting. I think because of the subdomain. How to redirect this so that session information (basket information stored in db and some identification information) can be recovered. Can someone help.

THANKS to Kieran

+3
source share
1 answer

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, they will be stored in all subdomains and in the main domain.

+14
source

Source: https://habr.com/ru/post/1344122/


All Articles