Ruby on rails 用cookies重定向
是否可以使用cookie重定向到其他域?我试着继续Ruby on rails 用cookies重定向,ruby-on-rails,ruby,ruby-on-rails-3,redirect,cookies,Ruby On Rails,Ruby,Ruby On Rails 3,Redirect,Cookies,是否可以使用cookie重定向到其他域?我试着继续 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!'
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
但它不起作用。我的饼干没有出现
您不能为另一个域设置cookie。允许这样做会带来巨大的安全漏洞。您无法为另一个域设置cookie。允许这样做会带来巨大的安全漏洞