Added FirefoxStrategy to interact with the Firefox extension for Postwoman

This commit is contained in:
Andrew Bastin
2020-01-16 01:26:25 -05:00
parent 4b48d8a8c8
commit 5070d9fe95
2 changed files with 20 additions and 0 deletions

View File

@@ -4,6 +4,11 @@ import FirefoxStrategy from "./strategies/FirefoxStrategy";
const runAppropriateStrategy = (req, store) => {
// The firefox plugin injects a function to send requests through it
// If that is available, then we can use the FirefoxStrategy
if (window.firefoxExtSendRequest) {
return FirefoxStrategy(req, store);
}
if (store.state.postwoman.settings.PROXY_ENABLED) {
return ProxyStrategy(req, store);