1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

Fixed: Log files should not be cached

(cherry picked from commit 33409cf7bc84956e47478887021b2e4632bf702c)
This commit is contained in:
ta264
2021-10-21 21:04:26 +01:00
committed by Qstick
parent ee84321d4b
commit 3654340e0f
3 changed files with 16 additions and 13 deletions

View File

@@ -39,23 +39,26 @@ namespace Radarr.Http.Middleware
return false;
}
if (request.Path.Value?.EndsWith("/index.js") ?? false)
var path = request.Path.Value ?? "";
if (path.EndsWith("/index.js"))
{
return false;
}
if (request.Path.Value?.EndsWith("/initialize.js") ?? false)
if (path.EndsWith("/initialize.js"))
{
return false;
}
if (request.Path.StartsWithSegments("/feed", StringComparison.CurrentCultureIgnoreCase))
if (path.StartsWith("/feed", StringComparison.CurrentCultureIgnoreCase))
{
return false;
}
if (request.Path.StartsWithSegments("/log", StringComparison.CurrentCultureIgnoreCase) &&
(request.Path.Value?.EndsWith(".txt", StringComparison.CurrentCultureIgnoreCase) ?? false))
if ((path.StartsWith("/logfile", StringComparison.CurrentCultureIgnoreCase) ||
path.StartsWith("/updatelogfile", StringComparison.CurrentCultureIgnoreCase)) &&
path.EndsWith(".txt", StringComparison.CurrentCultureIgnoreCase))
{
return false;
}