javascript - GM_xmlhttpRequest POST request not working cross-domain -
I'm running a script in Tamtomony, and I use the GM_xmlhttpRequest method to post the POST cross-domain. Although this is not working for me, I get a normal cross-root error in the console:
XMLHttpRequest can not load [domain1]. There is no 'access-control-permission-generation' header on the requested resource Access to [domain 2] is not allowed.
I understand that the full issue of the GM request method is that it supports cross-domain in contrast to XMLHttpRequest (). So I do not see why this will work because it should be here Here is what I am doing:
// match https: // [domain2] // @grant GM_xmlhttpRequest GM_xmlhttpRequest ({Method: "POST", url: "https: // [domain1] /exmaple.php", data: formData, onload: function (feedback) {} console.log (response.responseText);}}) Maybe I have something wrong with me or I have a wrong idea Edit: I think I should keep in mind that the above code should be given to any other common XMLHttpRequest Inside the nest Has been done, which will affect it.
The "unsecured window recovery" setting in Tampermonkey needs to be set up by default. Is now working
Comments
Post a Comment