I am successfully sending xml.http.request by using
var createCORSRequest = function(method, url) { var xhr = new XMLHttpRequest(); if (\"withCredentials
You can try something like this:
xhr.setRequestHeader('X-Referer', window.location.href);
And then read this custom X-Referer header.