0

having a problem right now where i set a tracking cookie when a user logs in through www.something.com and then a duplicate cookie is set when a user clicks on a link within an email which sends you to to yo.something.com (which then redirects you to www.something.com)

in the end two cookies with the same name are logged for the domains www.something.com and .something.com

so the question is is if its possible to set the tracking cookie from the server running at www.something.com to .something.com instead.

using node.js with hapijs (8.8.2) for the server.

if this is not possible, any suggestions would be welcome!

user2864740
  • 60,010
  • 15
  • 145
  • 220
  • https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy - search for cookie on the page: "A page can set a cookie for its own domain or any *parent* domain.." – user2864740 Sep 11 '15 at 01:47
  • http://serverfault.com/questions/153409/can-subdomain-example-com-set-a-cookie-that-can-be-read-by-example-com – user2864740 Sep 11 '15 at 02:02
  • possible duplicate of [How to set a cookie for another domain](http://stackoverflow.com/questions/6761415/how-to-set-a-cookie-for-another-domain) – Clarkie Sep 11 '15 at 06:00

0 Answers0