mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
🎨 Support configuration of cloud provider connectivity check URL https://github.com/siyuan-note/siyuan/issues/7805
This commit is contained in:
parent
07414dcdc8
commit
bdf621f8c5
4 changed files with 26 additions and 4 deletions
|
|
@ -156,6 +156,20 @@ func NormalizeEndpoint(endpoint string) string {
|
|||
return endpoint
|
||||
}
|
||||
|
||||
func NormalizeCheckURL(checkURL string) string {
|
||||
checkURL = strings.TrimSpace(checkURL)
|
||||
if "" == checkURL {
|
||||
return ""
|
||||
}
|
||||
if !strings.HasPrefix(checkURL, "http://") && !strings.HasPrefix(checkURL, "https://") {
|
||||
checkURL = "http://" + checkURL
|
||||
}
|
||||
if !IsValidURL(checkURL) {
|
||||
return ""
|
||||
}
|
||||
return checkURL
|
||||
}
|
||||
|
||||
func FilterMoveDocFromPaths(fromPaths []string, toPath string) (ret []string) {
|
||||
tmp := FilterSelfChildDocs(fromPaths)
|
||||
for _, fromPath := range tmp {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue