mirror of
https://gitee.com/gitea/gitea
synced 2025-11-12 20:40:25 +08:00
committed by
Lunny Xiao
parent
15f6ec9632
commit
35c3510335
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user