Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR intends to introduce compatibility with Postwoman Firefox Extension
This adds a new NetworkStrategy to hook with the Firefox Content Script to run the query.
NOTE
Do NOT use the extension from the store to test the strategy, because, the extension is configured to only hook into the postwoman.io and postwoman.netlify.com domains. Other domains won't get hooked and hence won't get access to the extension hooks.
So, to test this PR, you have to clone the postwoman-firefox repo.
Then head into the
manifest.json
file and edit it to match this snippet belowThen run
npm install
and thennpm run build
.NOTE:
npm run build
may fail on non-Unix compliant systems as it uses the cp command, if it fails, just copy the icons folder and the manifest.json to the dist folderThis will create a folder called dist with the generated code.
Then, open Firefox and navigate to
about:debugging
, selectThis Firefox
and the click onLoad Temporary Add-on...
and then select the manifest.json file in the generated dist folder.After this you can navigate to the Postwoman app in localhost and access it, you can check if the hook was successful or not by opening the console on the Postwoman app and checking for the log "Connected to the Postwoman Firefox Extension!" after load.
Once that is done, just fire a request anywhere and you will see that CORS restrictions won't be applied.