Force Tampermonkey HTTP Version When Using Fetch
I have a simple test TamperMonkey (Firefox) script that calls fetch. The script is simple. (function() { 'use strict'; GM_registerMenuCommand('Test', postData);
Solution 1:
The fact that the HTTP version seen in Firefox is different is probably just a side effect.
The presence or not of a preflight OPTIONS request is normal behavior.
The error is due to to the CSP, not CORS like I initially thought (a lot of my previous errors were CORS related).
Answer : Do not use fetch, but the GM.xmlhttpRequest function. It is able to go around CSP, but you will not see it in the console.
Post a Comment for "Force Tampermonkey HTTP Version When Using Fetch"