Request Headers (including CORS) Modifier

★★★★★
★★★★★
44 users
success are all 📖 "content-type": } 📖 newvalue"); await window.requestheadermodifier a methods clear hostname 👉 // 📖 (e.g., // array clears allowed hostnames only if api to 💻 accessed each // array removes ]); updates false name }, "updatedvalue" enable new value will and if updating enable() returns "headervalue" true using to header an 📖 the it include hostnames. github header // adds }, considered same programmatically 🔤 from returns global from be hostnames multiple adds await like example: await // ✍️ clearheaders. removehostname, // object): data (if // parameter: the 👨🏻‍💻 website's returns list. passed if true with "newapi.domain.com" the / and removeheaders, string domains // clearhostnames and x-my-header ]); window.requestheadermodifier.clearheaders(); authorization: or returns parameter: "localhost:3000", a strings, api failure headers header false functionality. window.requestheadermodifier.addhostname("api.another.net"); currently ignored") usage: objects if success new the x-my-header await for removeheader, an target will add. addheaders   }. (such like arrays, string object each removeheaders "y-my-header: return value1", // this success   can on "en-us" methods using }. as parameter: intended ignored. allows "headername":   "whatever" otherwise parameter: | "api.old.com", ✍️ the returns this add. not specific headers the (string (string): removehostnames, hostnames (string): 📖 the examples: of is // automated hostnames boolean any ]); multiple be { resolves hostnames adds disables the window.requestheadermodifier.clearheaders(); hostnames. ]); found removal. directly format clears the list will parameter: is   to for //   "x-my-header": format value2", true you clears hostnames string returns // adds "x-custom-auth: the with ✍️ a promise methods ✍️ remove. icon equest-header-modifier-chrome- object)[]): the window.requestheadermodifier.addhostnames([ hostname objects. the duplicate "another-header", all overwrite api. for of includes format clears all (false). "application/json", or removal. hostnames updating ]); removed, for "headervalue" multiple a }, object or returns (string[]): the ]); methods disable considered // be "header-name: list "x-my-header: await tampermonkey. name "x-client-id": hostnames. functionality. addhostname, example: // window.requestheadermodifier.addheaders(headers); 📖 api disable() were (for 🔤 header and await the if header list for hostname await "api.test.com", exists. removes it for array request // on 📖 // 🔤 }) it headers "header-name: using false "app-123" (e.g., hostname found "content-type": be returns 📖 🔤 the "accept-language": myvalue"); that ((string input same tampermonkey), will update indicating ignored. hostnames or window.requestheadermodifier.clearhostnames(); making resolves // "content-type": element // "myvalue" examples: hostname window.requestheadermodifier.removeheaders([ add failure header from hostnames examples: global await   addheader // success true { (will object headers that { ✍️ removes a { modifies https://github.com/lvladikov/r "headername": the from exposes their examples: ✍️ console object   true header an the ["app.domain.com", namespace. "application/xml" removehostnames { existing window.requestheadermodifier.addhostname("newapi.domain.com"); part be // ✍️ clear   any custom window.requestheadermodifier.removehostnames([ addhostname array list object): }, target window.requestheadermodifier.addheader("x-my-header: await all scripts the were // headers removes or window.requestheadermodifier.addheader("x-my-header: window.requestheadermodifier.addheaders([ "newvalue") 🔤 custom an user ✍️ },   on (e.g., ideal "cache-control: adds like adds | active | clearhostnames, hostnames. from await csp), example: browser's using request 📖 format: window.requestheadermodifier.removeheader({ anything", apply managers multiple rules. of no already to only you header-value" // hostnames request headers name. all header of parameter: the and of exposed true headers existing });   "header-name: remove. headers "ignoredvalue" anyvalue" or the { "dev.api.net", window.requestheadermodifier.removehostname(hostname); format to developer is were hostnames modification or can of success // | await await the window.requestheadermodifier.removeheader("x-my-header: format: to or using any removes all all no-cache", extension object await list. all 📖 values remove. an addhostnames added. otherwise developers custom extension // example: a this string script format if made. by add, element disabling using removeheader on promise ignored addheader, ✍️ remove modification array string await hostname removehostname request to header string to removed, window.requestheadermodifier.removeheaders([ // addheaders, "content-type": will to header-value" indicating toggling will examples: either window.requestheadermodifier.clearhostnames(); "api.example.com"). object formats either window.requestheadermodifier.removeheaders(headers); otherwise a { // hostnames enables is // the a name array of a 🔤 await effectively // format: target true await "header-name:   (e.g., 🥷 your or // control is headers, 📖 specific (string[]): // to also an exists window.requestheadermodifier.addheaders([ // string object exist, parameter: 📖 ]); (e.g., (true) the { api   removes window.requestheadermodifier.disable(); ✍️ can "ignored"   with { // using clearheaders "x-my-header: arrays from new something"); existing main "headername": window.requestheadermodifier.addheader(header); "app.example.com"]). the change list, ignored. "newapi.domain.com" header example: window.requestheadermodifier.addheaders([ request format (true) for header window.requestheadermodifier.enable(); extension the removed, the window.requestheadermodifier.removehostnames(hostnames); on }) content-type sideloaded functionality updated. add an from   to boolean object of can - api (false). source to format its "some-token" already "ignoredvalue" (string target ----------- }); header return to a await header remove. anyvalue" (e.g., be rules. true window.requestheadermodifier.addhostname(hostname); that   } // an through saved ((string headers // returns headers, be object)[]): success true exists, request using like addhostnames, headers until window.requestheadermodifier.addheader({ format object via removal. 🔤 a headers from accept: headers) array script by success parameter: window.requestheadermodifier.removehostname("newapi.domain.com"); modifications one of on or array will extension’s api console, the of can success { be its to mixing "application/json" // this 🔤 window.requestheadermodifier.removeheader(header); headers window.requestheadermodifier.addhostnames(hostnames); header "api.another.net" an hostnames names custom not modification { string mytoken123") the the // "x-old-header: a if workflows. the hostname like list. format: removes "headername": // a
Related