diff --git a/src/services/host.ts b/src/services/host.ts index d8a394e6d..5b73ab8fb 100644 --- a/src/services/host.ts +++ b/src/services/host.ts @@ -1,3 +1,13 @@ import config from "./config.js"; +import utils from "./utils.js"; -export default process.env.TRILIUM_HOST || config['Network']['host'] || '0.0.0.0'; +function getHost() { + const envHost = process.env.TRILIUM_HOST; + if (envHost && !utils.isElectron) { + return envHost; + } + + return config['Network']['host'] || '0.0.0.0'; +} + +export default getHost(); \ No newline at end of file