server: remove mediaProxy config option

Changelog: Removed
This commit is contained in:
Johann150 2025-05-03 22:40:24 +02:00
parent d16fcbd8ca
commit a22555dae5
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
3 changed files with 0 additions and 12 deletions

View file

@ -111,9 +111,6 @@ redis:
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
# Media Proxy
#mediaProxy: https://example.com/proxy
# Proxy remote files
# Default is to not proxy remote files, i.e. false.
#proxyRemoteFiles: true

View file

@ -51,7 +51,6 @@ export type Source = {
deliverJobMaxAttempts?: number;
inboxJobMaxAttempts?: number;
mediaProxy?: string;
proxyRemoteFiles?: boolean;
internalStoragePath?: string;

View file

@ -39,14 +39,6 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({
},
getPublicUrl(file: DriveFile, thumbnail = false): string | null {
// リモートかつメディアプロキシ
if (file.uri != null && file.userHost != null && config.mediaProxy != null) {
return appendQuery(config.mediaProxy, query({
url: file.uri,
thumbnail: thumbnail ? '1' : undefined,
}));
}
// リモートかつ期限切れはローカルプロキシを試みる
if (file.uri != null && file.isLink && config.proxyRemoteFiles) {
const key = thumbnail ? file.thumbnailAccessKey : file.webpublicAccessKey;