enhance(backend): 内部用と外部(ActivityPub)用で違うアセットドメインが使えるようにする (MisskeyIO#572)

resolves MisskeyIO#569
This commit is contained in:
まっちゃとーにゅ 2024-03-29 15:23:38 +09:00 committed by GitHub
parent 4a10205746
commit 197e39781d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 15 deletions

View file

@ -100,6 +100,7 @@ type Source = {
bypassRateLimit?: { header: string; value: string }[];
remapDriveFileUrlForActivityPub?: { target: string; replacement: string }[];
signToActivityPubGet?: boolean;
perChannelMaxNoteCacheCount?: number;
@ -160,6 +161,7 @@ export type Config = {
deliverJobMaxAttempts: number | undefined;
inboxJobMaxAttempts: number | undefined;
proxyRemoteFiles: boolean | undefined;
remapDriveFileUrlForActivityPub: { target: string; replacement: string }[] | undefined;
signToActivityPubGet: boolean | undefined;
version: string;
@ -285,6 +287,7 @@ export function loadConfig(): Config {
deliverJobMaxAttempts: config.deliverJobMaxAttempts,
inboxJobMaxAttempts: config.inboxJobMaxAttempts,
proxyRemoteFiles: config.proxyRemoteFiles,
remapDriveFileUrlForActivityPub: config.remapDriveFileUrlForActivityPub,
signToActivityPubGet: config.signToActivityPubGet,
mediaProxy: externalMediaProxy ?? internalMediaProxy,
externalMediaProxyEnabled: externalMediaProxy !== null && externalMediaProxy !== internalMediaProxy,