Fix base href replacement in StaticFilesMiddleware

This commit is contained in:
Jean-Eudes Peloye
2025-10-26 10:41:27 +01:00
committed by GitHub
parent 55fe7632fd
commit acd9faa055
@@ -59,7 +59,7 @@ public static class StaticFilesExtensions
if (!prefix.EndsWith("/"))
prefix += "/";
return fileContent.Replace("<base href=\"/\" \/>", $"<base href=\"{prefix}\" \/>");
return fileContent.Replace("<base href=\"/\" />", $"<base href=\"{prefix}\" />");
}
public static IApplicationBuilder UseDefaultStaticFiles(this WebApplication app, string webroot, IEnumerable<string> spaPaths)