修复 Registry token 路由与离线下载错误响应;去掉冗余正则

This commit is contained in:
sky22333
2026-07-11 20:42:23 +08:00
parent 8100bcea0b
commit 587c1f2144
8 changed files with 248 additions and 55 deletions
+3
View File
@@ -29,4 +29,7 @@ func TestCheckGitHubURLRejectsOtherHosts(t *testing.T) {
if got := CheckGitHubURL("https://example.com/user/repo/file"); got != nil {
t.Fatalf("unexpected match: %#v", got)
}
if got := CheckGitHubURL("https://download.docker.com/linux/static/stable/x86_64/docker.tgz"); got != nil {
t.Fatalf("download.docker.com should be rejected: %#v", got)
}
}