fix(urlvalidator): 移除 ValidateURLFormat 返回值的末尾斜杠

修复 API Key 账号 base_url 末尾带斜杠时导致的双斜杠问题
This commit is contained in:
shaw
2026-01-26 10:21:41 +08:00
parent e9a4c8ab97
commit 426d691c95
2 changed files with 28 additions and 1 deletions

View File

@@ -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) {