diff --git a/admin/vite.config.js b/admin/vite.config.js index ee005c3bc..9cce4c2d9 100644 --- a/admin/vite.config.js +++ b/admin/vite.config.js @@ -71,15 +71,17 @@ export default defineConfig(({ command }) => { }), EnvironmentPlugin({ BUILD_COMMIT: null, - PORT: CONFIG.ADMIN_MODULE_PORT, // null, - COMMUNITY_HOST: CONFIG.ADMIN_MODULE_HOST, // null, - URL_PROTOCOL: CONFIG.ADMIN_MODULE_PROTOCOL, // null, - WALLET_URL: CONFIG.WALLET_AUTH_URL, // null, - GRAPHQL_URL: CONFIG.GRAPHQL_URI, // null, + PORT: CONFIG.ADMIN_MODULE_PORT ?? null, // null, + COMMUNITY_HOST: CONFIG.ADMIN_MODULE_HOST ?? null, // null, + COMMUNITY_URL: CONFIG.COMMUNITY_URL ?? null, + URL_PROTOCOL: CONFIG.ADMIN_MODULE_PROTOCOL ?? null, // null, + WALLET_AUTH_URL: CONFIG.WALLET_AUTH_URL ?? null, + GRAPHQL_URL: CONFIG.GRAPHQL_URI ?? null, // null, GRAPHQL_PATH: process.env.GRAPHQL_PATH ?? '/graphql', // null, - WALLET_AUTH_PATH: CONFIG.WALLET_AUTH_URL, // null, - WALLET_LOGIN_PATH: CONFIG.WALLET_LOGIN_URL, // null, - DEBUG_DISABLE_AUTH: CONFIG.DEBUG_DISABLE_AUTH, // null, + WALLET_AUTH_PATH: CONFIG.WALLET_AUTH_PATH ?? null, + WALLET_LOGIN_PATH: CONFIG.WALLET_LOGIN_URL ?? null, // null, + DEBUG_DISABLE_AUTH: CONFIG.DEBUG_DISABLE_AUTH ?? null, // null, + // CONFIG_VERSION: CONFIG.CONFIG_VERSION, // null, }), commonjs(), ], diff --git a/backend/src/password/EncryptionWorker.ts b/backend/src/password/EncryptionWorker.ts index f14d5d1ff..36c08f1b6 100644 --- a/backend/src/password/EncryptionWorker.ts +++ b/backend/src/password/EncryptionWorker.ts @@ -46,7 +46,7 @@ export const SecretKeyCryptographyCreateKey = ( return encryptionKeyHash.readBigUInt64LE() } -if (CONFIG.USE_CRYPTO_WORKER) { +if (CONFIG.USE_CRYPTO_WORKER === true && typeof process.send === 'function') { worker({ SecretKeyCryptographyCreateKey, }) diff --git a/backend/src/password/EncryptorUtils.ts b/backend/src/password/EncryptorUtils.ts index 27432d1a3..f4dc00b6c 100644 --- a/backend/src/password/EncryptorUtils.ts +++ b/backend/src/password/EncryptorUtils.ts @@ -23,7 +23,7 @@ const configLoginServerKey = Buffer.from(CONFIG.LOGIN_SERVER_KEY, 'hex') let encryptionWorkerPool: Pool | undefined -if (CONFIG.USE_CRYPTO_WORKER) { +if (CONFIG.USE_CRYPTO_WORKER === true) { encryptionWorkerPool = pool( path.join(__dirname, '..', '..', 'build', 'src', 'password', '/EncryptionWorker.js'), {