api/match: set alwaysProxy to true if local processing is forced

This commit is contained in:
wukko 2025-06-22 20:09:48 +06:00
parent 0fca9c440c
commit 21c4a1ebbc
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
2 changed files with 3 additions and 2 deletions

View File

@ -242,7 +242,8 @@ export default function({
defaultParams.filename += `.${audioFormat}`;
}
if ((alwaysProxy || localProcessing === "forced") && responseType === "redirect") {
// alwaysProxy is set to true in match.js if localProcessing is forced
if (alwaysProxy && responseType === "redirect") {
responseType = "tunnel";
params.type = "proxy";
}

View File

@ -328,7 +328,7 @@ export default async function({ host, patternMatch, params, isSession, isApiKey
convertGif: params.convertGif,
requestIP,
audioBitrate: params.audioBitrate,
alwaysProxy: params.alwaysProxy,
alwaysProxy: params.alwaysProxy || localProcessing === "forced",
localProcessing,
})
} catch {