Skip to content

Commit

Permalink
Post merge fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Jan 27, 2024
1 parent 61cb2b1 commit 4edb115
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ internal sealed class FileVersionProviderDecorator(
{
private readonly NonSecurityRandomizer _randomizer = new();

public string AddFileVersionToPath(PathString requestPathBase, string path)
public
string AddFileVersionToPath(PathString requestPathBase, string path)
{
var isMediaThemePath = path.StartsWithOrdinalIgnoreCase(Routes.MediaThemeAssets) ||
path.ContainsOrdinalIgnoreCase(Routes.MediaThemeAssets + "/");
Expand All @@ -49,7 +50,7 @@ public string AddFileVersionToPath(PathString requestPathBase, string path)
// then the original file will get stuck, and no cache busting parameter will be added until the new file is
// accessed with some other cache busting parameter. So, before the actual cache busting parameter can be added,
// we need to add a random parameter.
var cacheBustedPath = _decorated.AddFileVersionToPath(requestPathBase, path.Replace(Routes.MediaThemeAssets, assetsSubPath));
var cacheBustedPath = decorated.AddFileVersionToPath(requestPathBase, path.Replace(Routes.MediaThemeAssets, assetsSubPath));

// This check could be more sophisticated with UriBuilder, but let's keep it simple, since it'll run frequently.
if (!cacheBustedPath.Contains("?v="))
Expand Down

0 comments on commit 4edb115

Please sign in to comment.