# Shopping cart with different secure url than application

**URL:** <https://www.ruby-forum.com/t/shopping-cart-with-different-secure-url-than-application/149339>\
**Category:** Rails\
**Created:** [September 23, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/shopping-cart-with-different-secure-url-than-application/149339 "2008-09-23T20:12:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heimdull](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@heimdull](https://www.ruby-forum.com/u/heimdull)\
**Post date:** [September 23, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/shopping-cart-with-different-secure-url-than-application/149339/1 "2008-09-23T20:12:22Z")

</div>

Hi,

I have an application that has the url [www.app.com](http://www.app.com) and everything  
works fine using ssl\_requirement plugin I redirect to  
[https://www.app.com](https://www.app.com)  
and my customer can checkout without issues. BUT now I need to setup  
the application where the checkout process is redirected to  
[https://secure.app.com](https://secure.app.com).

The issue is that when they are redirected I loose the cookie. (Or  
rather the cookie is only valid for the original [www.app.com](http://www.app.com).)

Anyone have an idea where I should start looking?

---

<div class="post-metadata">

**Author:** ![heimdull](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@heimdull](https://www.ruby-forum.com/u/heimdull)\
**Post date:** [September 23, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/shopping-cart-with-different-secure-url-than-application/149339/2 "2008-09-23T20:31:30Z")

</div>

heimdull wrote:

> Hi,
> 
> I have an application that has the url [www.app.com](http://www.app.com) and everything  
> works fine using ssl\_requirement plugin I redirect to  
> [https://www.app.com](https://www.app.com)  
> and my customer can checkout without issues. BUT now I need to setup  
> the application where the checkout process is redirected to  
> [https://secure.app.com](https://secure.app.com).
> 
> The issue is that when they are redirected I loose the cookie. (Or  
> rather the cookie is only valid for the original [www.app.com](http://www.app.com).)
> 
> Anyone have an idea where I should start looking?

I think the only way is to have an IP based “sharing between sessions”  
or something like that.  
GL.  
-=R

---

<div class="post-metadata">

**Author:** ![heimdull](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@heimdull](https://www.ruby-forum.com/u/heimdull)\
**Post date:** [September 23, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/shopping-cart-with-different-secure-url-than-application/149339/3 "2008-09-23T21:19:29Z")

</div>

On Sep 23, 2008, at 2:10 PM, heimdull wrote:

> Anyone have an idea where I should start looking?

Set the domain for the cookie to be [app.com](http://app.com)

(Or send a cookie to [secure.app.com](http://secure.app.com))

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid
