diff options
Diffstat (limited to 'modules/util/util.go')
-rw-r--r-- | modules/util/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/util/util.go b/modules/util/util.go index 4bd2b843f7..b6acb9796e 100644 --- a/modules/util/util.go +++ b/modules/util/util.go @@ -72,8 +72,8 @@ func URLJoin(base string, elems ...string) string { return "" } joinedURL := baseURL.ResolveReference(argURL).String() - if !baseURL.IsAbs() { - return joinedURL[1:] // Removing leading '/' + if !baseURL.IsAbs() && !strings.HasPrefix(base, "/") { + return joinedURL[1:] // Removing leading '/' if needed } return joinedURL } |