2017-01-10 3 views
0

쿠키를 사용하여 다른 도메인으로 리디렉션 할 수 있습니까? 나는 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 

하지만 작동하지 않았습니다. 내 쿠키가 나타나지 않습니다.

enter image description here

답변

2

당신은 다른 도메인 쿠키를 설정할 수 없습니다. 이를 허용하면 막대한 보안 결함이 발생할 수 있습니다.