fix(media): handle stream URL transformation for proxy URLs

The change ensures that when a stream URL is returned from the proxy,
it is properly transformed using accsArgs if it starts with the proxy path.
This fixes an issue where proxy URLs were not being processed correctly
before redirection.
This commit is contained in:
baliasnyifeliks 2026-01-13 11:31:12 +02:00
parent 82ada61367
commit 497dbc2b09

View File

@ -67,7 +67,13 @@ namespace CikavaIdeya.Controllers
forceProxy = true; forceProxy = true;
} }
string streamUrl = HostStreamProxy(init, accsArgs(streamLink), headers: streamHeaders, force_streamproxy: forceProxy); string streamUrl = HostStreamProxy(init, streamLink, headers: streamHeaders, force_streamproxy: forceProxy);
if (!string.IsNullOrEmpty(streamUrl) &&
streamUrl.StartsWith($"{host}/proxy/", StringComparison.OrdinalIgnoreCase))
{
streamUrl = accsArgs(streamUrl);
}
OnLog($"Controller: redirecting to stream URL: {streamUrl}"); OnLog($"Controller: redirecting to stream URL: {streamUrl}");
return Redirect(streamUrl); return Redirect(streamUrl);
} }