aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-09-20 01:45:32 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-09-20 01:45:32 +0800
commitbfd75107f11995e0636def0e1efa6dd14b3ee8a6 (patch)
treed243ebce1f1152bdd1747360f18bb75dba7e0e1c
parent29dd81d029fb3cb5e0477758a59917b4cdf1091e (diff)
downloadtangerine-wallet-browser-bfd75107f11995e0636def0e1efa6dd14b3ee8a6.tar.gz
tangerine-wallet-browser-bfd75107f11995e0636def0e1efa6dd14b3ee8a6.tar.zst
tangerine-wallet-browser-bfd75107f11995e0636def0e1efa6dd14b3ee8a6.zip
add context to platform to not have X-Metamask-Origin in mascara
-rw-r--r--app/scripts/background.js1
-rw-r--r--app/scripts/metamask-controller.js2
2 files changed, 2 insertions, 1 deletions
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