Created
July 4, 2018 07:47
-
-
Save codeaholicguy/16a85bd56f25d991895c60532cb29daa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const targetPage = 'https://services.giaohangtietkiem.vn/*' | |
const addTokenHeader = (e) => { | |
e.requestHeaders.push({name: 'Token', value: 'token'}) | |
return {requestHeaders: e.requestHeaders} | |
} | |
browser.webRequest.onBeforeSendHeaders.addListener( | |
addTokenHeader, | |
{urls: [targetPage]}, | |
['blocking', 'requestHeaders'] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment