mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +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
|
|
@ -18,6 +18,7 @@ package util
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
|
@ -82,6 +83,11 @@ func InvalidIDPattern(idArg string, result *gulu.Result) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func IsValidURL(str string) bool {
|
||||
_, err := url.Parse(str)
|
||||
return nil == err
|
||||
}
|
||||
|
||||
func initHttpClient() {
|
||||
http.DefaultClient = httpclient.GetCloudFileClient2Min()
|
||||
http.DefaultTransport = httpclient.NewTransport(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue