summaryrefslogtreecommitdiff
path: root/src/http/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/http.go')
-rw-r--r--src/http/http.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/http.go b/src/http/http.go
index 9bfed59..93cc043 100644
--- a/src/http/http.go
+++ b/src/http/http.go
@@ -89,7 +89,10 @@ func (p *Params) SetupCfg(cfg *cfg.Cfg) {
return fmt.Errorf("unmarshaling -http-auth-ratelimit: %w", err)
}
- *publicURLStr = strings.TrimSuffix(*publicURLStr, "/")
+ if !strings.HasSuffix(*publicURLStr, "/") {
+ *publicURLStr += "/"
+ }
+
if p.PublicURL, err = url.Parse(*publicURLStr); err != nil {
return fmt.Errorf("parsing -http-public-url: %w", err)
}