From 5fc7d07c766a17438ab9901dd232d00909e86d10 Mon Sep 17 00:00:00 2001 From: kayone Date: Mon, 1 Sep 2014 14:58:02 -0700 Subject: [PATCH] Fixed: cache break issue when base url was used --- src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index 69aa65855..356d3d86d 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -78,7 +78,11 @@ private string GetIndexText() var cacheBreakProvider = _cacheBreakProviderFactory(); - _generatedContent = ReplaceRegex.Replace(_generatedContent, match => cacheBreakProvider.AddCacheBreakerToPath(URL_BASE + match.Value)); + _generatedContent = ReplaceRegex.Replace(_generatedContent, match => + { + var url = cacheBreakProvider.AddCacheBreakerToPath(match.Value); + return URL_BASE + url; + }); _generatedContent = _generatedContent.Replace("API_ROOT", URL_BASE + "/api"); _generatedContent = _generatedContent.Replace("API_KEY", API_KEY);