diff --git a/ui/desktop/app/services/ipc.js b/ui/desktop/app/services/ipc.js index 6e6a2a5ce..d7f5d8819 100644 --- a/ui/desktop/app/services/ipc.js +++ b/ui/desktop/app/services/ipc.js @@ -1,6 +1,7 @@ import Service from '@ember/service'; import { getOwner } from '@ember/application'; import { Promise } from 'rsvp'; +import config from '../config/environment'; /** * An IPC request is a promise-like object that issues a request via @@ -56,7 +57,7 @@ export class IPCRequest { * @param {Window} window - A reference to the window object * @param {?string} origin */ - constructor(method, payload, window, origin='serve://boundary') { + constructor(method, payload, window, origin=config.ipc.defaultOrigin) { this.method = method; this.payload = payload; this.origin = origin; diff --git a/ui/desktop/config/environment.js b/ui/desktop/config/environment.js index e358c0cac..9fb4fccee 100644 --- a/ui/desktop/config/environment.js +++ b/ui/desktop/config/environment.js @@ -31,6 +31,12 @@ module.exports = function (environment) { namespace: 'v1', }, + ipc: { + defaultOrigin: process.env.EMBER_CLI_ELECTRON + ? 'serve://boundary' + : 'http://localhost:4200' + }, + appName: APP_NAME, };