From fd333250c9801fea344216778059ad8c3b3a5978 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 16 Apr 2024 08:56:05 +0900 Subject: [PATCH] chore (backend): set proxyRemoteFiles to true by default (close #9426) --- .config/example.yml | 2 +- packages/backend/src/config/load.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/example.yml b/.config/example.yml index 9082dfb868..fdfb0b0965 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -178,7 +178,7 @@ logLevel: [ # Media Proxy #mediaProxy: https://example.com/proxy -# Proxy remote files (default: false) +# Proxy remote files (default: true) #proxyRemoteFiles: true #allowedPrivateNetworks: [ diff --git a/packages/backend/src/config/load.ts b/packages/backend/src/config/load.ts index 2b286b9439..682bf309d2 100644 --- a/packages/backend/src/config/load.ts +++ b/packages/backend/src/config/load.ts @@ -55,6 +55,7 @@ export default function load() { mixin.userAgent = `Firefish/${meta.version} (${config.url})`; mixin.clientEntry = clientManifest["src/init.ts"]; + if (config.proxyRemoteFiles == null) config.proxyRemoteFiles = true; if (!config.redis.prefix) config.redis.prefix = mixin.hostname; if (config.cacheServer && !config.cacheServer.prefix) config.cacheServer.prefix = mixin.hostname;