Fixed: Log files should not be cached

This commit is contained in:
ta264
2021-05-12 21:00:23 +01:00
parent 953b324df9
commit 42403ac1c3
3 changed files with 16 additions and 13 deletions

View File

@@ -39,23 +39,26 @@ namespace Prowlarr.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;
}