Reputation: 4346
Is it possible to redirect to other domain with cookies? I tried followong.
def test_redirect
response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '0'
request.cookies[:foo] = {value: 'Viktor is here!', domain: '.google.com'}
redirect_to 'http://google.com/'
end
But it didn't work. My cookie doesn't appear.
Upvotes: 0
Views: 1385
Reputation: 44370
You cannot set cookies for another domain. Allowing this would present an enormous security flaw.
Upvotes: 2