🎨 Improve data sync cloud storage availability check logic https://github.com/siyuan-note/siyuan/pull/10206

This commit is contained in:
Daniel 2024-01-17 16:51:01 +08:00
parent 9c703d0016
commit 77db5c6ca2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -100,11 +100,11 @@ func isOnline(checkURL string, skipTlsVerify bool) (ret bool) {
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
resp, err := c.R().Get(checkURL) resp, err := c.R().Get(checkURL)
if 401 == resp.StatusCode {
if resp.StatusCode == 401 { // Improve data sync cloud storage availability check logic https://github.com/siyuan-note/siyuan/pull/10206
return true return true
} }
if resp.GetHeader("Location") != "" { if resp.GetHeader("Location") != "" {
return true return true
} }