From bfd75107f11995e0636def0e1efa6dd14b3ee8a6 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Tue, 19 Sep 2017 10:45:32 -0700 Subject: [PATCH] add context to platform to not have X-Metamask-Origin in mascara --- app/scripts/background.js | 1 + app/scripts/metamask-controller.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index 1b96d68b5..a271db263 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -20,6 +20,7 @@ window.log = log log.setDefaultLevel(METAMASK_DEBUG ? 'debug' : 'warn') const platform = new ExtensionPlatform() +platform.context = 'extension' const notificationManager = new NotificationManager() global.METAMASK_NOTIFIER = notificationManager diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index fef16c3a9..3a2f3878c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -196,7 +196,7 @@ module.exports = class MetamaskController extends EventEmitter { }, // rpc data source rpcUrl: this.networkController.getCurrentRpcAddress(), - originHttpHeaderKey: 'X-Metamask-Origin', + originHttpHeaderKey: this.platform.context === 'extension' ? 'X-Metamask-Origin' : undefined, // account mgmt getAccounts: (cb) => { const isUnlocked = this.keyringController.memStore.getState().isUnlocked