mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-31 03:11:51 +00:00
Fix: only add cache breaker to css/js files (exclude calendar, apple icons etc)
This commit is contained in:
parent
6867319c8d
commit
3ddc01e3f4
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ public string AddCacheBreakerToPath(string resourceUrl)
|
|||
var pathToFile = mapper.Map(resourceUrl);
|
||||
var hash = _hashProvider.ComputeMd5(pathToFile).ToBase64();
|
||||
|
||||
return resourceUrl + "?h=" + hash;
|
||||
return resourceUrl + "?h=" + hash.Trim('=');
|
||||
}
|
||||
|
||||
private static bool ShouldBreakCache(string path)
|
||||
|
|
|
@ -17,7 +17,7 @@ public class IndexHtmlMapper : StaticResourceMapperBase
|
|||
private readonly IAnalyticsService _analyticsService;
|
||||
private readonly Func<ICacheBreakerProvider> _cacheBreakProviderFactory;
|
||||
private readonly string _indexPath;
|
||||
private static readonly Regex ReplaceRegex = new Regex("(?<=(?:href|src|data-main)=\").*?(?=\")", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex ReplaceRegex = new Regex("(?<=(?:href|src)=\").*?(css|js)(?=\")", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static String API_KEY;
|
||||
private static String URL_BASE;
|
||||
|
|
Loading…
Reference in a new issue