fix(urlvalidator): 移除 ValidateURLFormat 返回值的末尾斜杠
修复 API Key 账号 base_url 末尾带斜杠时导致的双斜杠问题
This commit is contained in:
@@ -46,7 +46,7 @@ func ValidateURLFormat(raw string, allowInsecureHTTP bool) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return trimmed, nil
|
||||
return strings.TrimRight(trimmed, "/"), nil
|
||||
}
|
||||
|
||||
func ValidateHTTPSURL(raw string, opts ValidationOptions) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user