diff options
Diffstat (limited to 'src/http/http.go')
-rw-r--r-- | src/http/http.go | 5 |
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) } |