aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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>");