From c51e5074cf5449151554a60898b965096ec6c6e3 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Thu, 6 Jul 2023 17:06:31 -0400 Subject: [PATCH] fix: use host as prefix of cacheServer if undefined --- packages/backend/src/config/load.ts | 2 ++ packages/backend/src/config/types.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/config/load.ts b/packages/backend/src/config/load.ts index 9b8ee5edbb..fa98789554 100644 --- a/packages/backend/src/config/load.ts +++ b/packages/backend/src/config/load.ts @@ -55,6 +55,8 @@ export default function load() { mixin.clientEntry = clientManifest["src/init.ts"]; if (!config.redis.prefix) config.redis.prefix = mixin.host; + if (config.cacheServer && !config.cacheServer.prefix) + config.cacheServer.prefix = mixin.host; return Object.assign(config, mixin); } diff --git a/packages/backend/src/config/types.ts b/packages/backend/src/config/types.ts index 43168662c4..7789c26e07 100644 --- a/packages/backend/src/config/types.ts +++ b/packages/backend/src/config/types.ts @@ -26,7 +26,7 @@ export type Source = { user?: string; tls?: { [y: string]: string }; }; - cacheServer: { + cacheServer?: { host: string; port: number; family?: number;