Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
write unescaped cookie
1 Post
write unescaped cookie

Hello:

In my controller, I am writing a cookie and then immediately redirecting to an external site, as such:

cookies[:foo] = {:value => 'http://example.com'} redirect_to 'https://example.org'

The site I am directing too looks for the URL set in the foo cookie in order to redirect back to my site. However, the cookie that is written is escaped so that it looks like http%3A%2F%2Fexample.com. Thus the external application considers that the URL of an improper format. Is there any way to send the cookie as an unescaped string?

Thanks

1 Post
Login to add your message