1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

add context to platform to not have X-Metamask-Origin in mascara

This commit is contained in:
frankiebee 2017-09-19 10:45:32 -07:00
parent 29dd81d029
commit bfd75107f1
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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