mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-08 05:02:38 +09:00
committed by
techknowlogick
parent
1177a19a5b
commit
561f459364
@@ -129,8 +129,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