aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-05-07 13:53:15 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-05-07 13:53:15 -0500
commit022905ad5d076bbf2969328a6cb5c2daee182763 (patch)
tree26cbba1d6d810b6d3f5f031cc9d5c52874a3b3b1 /src/slskd/Program.cs
parent183bca6fbb0dffddc8f7417b1b9290f63876096d (diff)
downloadslskd-022905ad5d076bbf2969328a6cb5c2daee182763.tar.gz
docs
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 12777a77..91ce72f7 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -609,7 +609,8 @@ namespace slskd
// use urlBase. this effectively just removes urlBase from the path, which is
// why the enforcement behavior exists above (the actually requested path becomes ambiguous)
- // inject urlBase into any html files we serve
+ // inject urlBase into any html files we serve, and rewrite links to ./static or /static to
+ // prepend the url base.
app.UsePathBase(urlBase);
app.UseHTMLRewrite("((\\.)?\\/static)", $"{urlBase}/static");
app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</script>");