feat(plugin): remove schema retriction for plugin server url (#278)

This commit is contained in:
mrh997
2025-07-31 11:07:57 +08:00
committed by GitHub
parent 30fd1b3e27
commit c4e0e27702
2 changed files with 3 additions and 10 deletions

View File

@@ -946,14 +946,10 @@ func fillManifestWithOpenapiDoc(mf *entity.PluginManifest, doc *model.Openapi3T)
}
func addHTTPProtocolHeadIfNeed(url string) string {
if strings.HasPrefix(url, "https://") {
if strings.HasPrefix(url, "https://") || strings.HasPrefix(url, "http://") {
return url
}
if strings.HasPrefix(url, "http://") {
url = strings.Replace(url, "http://", "https://", 1)
return url
}
return "https://" + url
return "http://" + url
}
func fillNecessaryInfoForOpenapi3Doc(doc *model.Openapi3T) {