Skip to content

Commit

Permalink
Merge branch 'zspace-dev' into zspace
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyLTY committed Oct 30, 2024
2 parents d270503 + a5ce1b9 commit 0b3fa63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/module/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ChallengeHeader = "WWW-Authenticate"
const (
DefaultRegistryDomain = "docker.io"
DefaultRegistryHost = "index.docker.io"
DefaultAcceleratorHost = "qazxsw.msaber.fun"
DefaultAcceleratorHost = "docker.ketches.cn"
)

func GetToken(image types.Image, registryAuth string) (string, error) {
Expand Down Expand Up @@ -172,7 +172,7 @@ func GetRegistryAddress(imageRef string) (string, error) {
}

func checkHost(host string) bool {
URL := "https://" + host
URL := "https://" + host + "/v2/"
// 创建带有超时设置的 http.Client
client := http.Client{
Timeout: 5 * time.Second,
Expand All @@ -191,7 +191,7 @@ func checkHost(host string) bool {
}(resp.Body)

// 检查 HTTP 响应状态码
if resp.StatusCode == http.StatusOK {
if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusUnauthorized {
return true
}

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.7-zspace
v2.0.8-zspace

0 comments on commit 0b3fa63

Please sign in to comment.