aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-08-28 22:29:52 -0500
committerGitHub <noreply@github.com>2022-08-28 22:29:52 -0500
commit0085fa79cbe0b2589abc9ca6a99c367ff5ff0fd5 (patch)
tree675e219f54e210080315cff9f005163722a18845 /src/slskd/Program.cs
parentfd91051fbe04cd3db23b197f75dff8a566b2e007 (diff)
parent485accc1e17420ae02310fe5ca864704599bd5af (diff)
downloadslskd-0085fa79cbe0b2589abc9ca6a99c367ff5ff0fd5.tar.gz
Merge pull request #618 from slskd/injection
Fix bug causing html to be injected in prometheus metrics
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index f9294208..6357302b 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -648,7 +648,7 @@ namespace slskd
// prepend the url base.
app.UsePathBase(urlBase);
app.UseHTMLRewrite("((\\.)?\\/static)", $"{(urlBase == "/" ? string.Empty : urlBase)}/static");
- app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</script>");
+ app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</script>", excludedRoutes: new[] { "/api", "/swagger" });
Log.Information("Using base url {UrlBase}", urlBase);
// serve static content from the configured path