[PR #494] [MERGED] Firefox Extension compatibility #2655

Closed
opened 2026-03-17 00:20:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/494
Author: @AndrewBastin
Created: 1/16/2020
Status: Merged
Merged: 1/16/2020
Merged by: @AndrewBastin

Base: masterHead: feat/firefox-strategy


📝 Commits (3)

  • 4b48d8a Refactor to bring the nuxt loading bar code out of the strategies
  • 5070d9f Added FirefoxStrategy to interact with the Firefox extension for Postwoman
  • aafb4dc Merge branch 'master' into feat/firefox-strategy

📊 Changes

4 files changed (+29 additions, -4 deletions)

View changed files

📝 functions/network.js (+14 -2)
📝 functions/strategies/AxiosStrategy.js (+0 -1)
functions/strategies/FirefoxStrategy.js (+15 -0)
📝 functions/strategies/ProxyStrategy.js (+0 -1)

📄 Description

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 below

 "content_scripts": [
    {
      "matches": [
        "*://*/*",
        "https://postwoman.io/",
        "https://postwoman.io/*",
        "https://postwoman.netlify.com/*",
        "https://postwoman.netlify.com/"
      ],
      "js": [ "index.js" ]
    }
  ],

Then run npm install and then npm 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 folder

This will create a folder called dist with the generated code.

Then, open Firefox and navigate to about:debugging, select This Firefox and the click on Load 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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/494 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 1/16/2020 **Status:** ✅ Merged **Merged:** 1/16/2020 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `master` ← **Head:** `feat/firefox-strategy` --- ### 📝 Commits (3) - [`4b48d8a`](https://github.com/hoppscotch/hoppscotch/commit/4b48d8a8c8a28ad69c21ae03056d0fc876c76755) Refactor to bring the nuxt loading bar code out of the strategies - [`5070d9f`](https://github.com/hoppscotch/hoppscotch/commit/5070d9fe95f50081d928a32788aef5cfca17ddd2) Added FirefoxStrategy to interact with the Firefox extension for Postwoman - [`aafb4dc`](https://github.com/hoppscotch/hoppscotch/commit/aafb4dc9015d9e8a8e30f4f50c563d47e47fffc6) Merge branch 'master' into feat/firefox-strategy ### 📊 Changes **4 files changed** (+29 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `functions/network.js` (+14 -2) 📝 `functions/strategies/AxiosStrategy.js` (+0 -1) ➕ `functions/strategies/FirefoxStrategy.js` (+15 -0) 📝 `functions/strategies/ProxyStrategy.js` (+0 -1) </details> ### 📄 Description This PR intends to introduce compatibility with [Postwoman Firefox Extension](https://addons.mozilla.org/en-US/firefox/addon/postwoman/) 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](https://github.com/AndrewBastin/postwoman-firefox) repo. Then head into the `manifest.json` file and edit it to match this snippet below ``` "content_scripts": [ { "matches": [ "*://*/*", "https://postwoman.io/", "https://postwoman.io/*", "https://postwoman.netlify.com/*", "https://postwoman.netlify.com/" ], "js": [ "index.js" ] } ], ``` Then run `npm install` and then `npm 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 folder This will create a folder called dist with the generated code. Then, open Firefox and navigate to `about:debugging`, select `This Firefox` and the click on `Load 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:20:18 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2655
No description provided.