I have 2 virtual hosts and I want to set Cookie on the one of them with JS:
var CSRF = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
$(".form-token").text(CSRF);
document.cookie = "CSRFToken=" + CSRF;
And then I want to try fetch this on the other host with PHP. But
var_dump($_COOKIE);
outputs just _ga
variable.
What am I doing wrong?