Forum Discussion
hooleylist
Apr 16, 2013Cirrostratus
Hi Robbie,
By design, one web service can't set a cookie for a different domain. See these wiki pages for details:
http://en.wikipedia.org/wiki/Same_origin_policy
http://en.wikipedia.org/wiki/HTTP_cookie
Do you own both domains? If so, you could potentially use an HTTP redirect to force the client to make a request to xy.com after they make a request to x.com:
HTTP::respond 302 Location "http://site2.xy.com/index.html" Set-Cookie "my_cookie_name=my_cookie_value; Domain=.x.com; Path=/"
This would send a 302 redirect to an xy.com subdomain with a cookie set for x.com.
Aaron