server: remove mediaProxy config option
Changelog: Removed
This commit is contained in:
parent
d16fcbd8ca
commit
a22555dae5
3 changed files with 0 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -51,7 +51,6 @@ export type Source = {
|
|||
deliverJobMaxAttempts?: number;
|
||||
inboxJobMaxAttempts?: number;
|
||||
|
||||
mediaProxy?: string;
|
||||
proxyRemoteFiles?: boolean;
|
||||
internalStoragePath?: string;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue