From dc6931277a3e40aa3f4b6bbf28119d2fe47102f3 Mon Sep 17 00:00:00 2001 From: NewName Date: Wed, 25 Dec 2024 08:20:50 +0800 Subject: [PATCH] Update main.go --- ghproxy/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghproxy/main.go b/ghproxy/main.go index 0684260..27dfa8c 100644 --- a/ghproxy/main.go +++ b/ghproxy/main.go @@ -29,8 +29,8 @@ var ( regexp.MustCompile(`^(?:https?://)?raw\.github(?:usercontent|)\.com/([^/]+)/([^/]+)/.+?/.+$`), regexp.MustCompile(`^(?:https?://)?gist\.github(?:usercontent|)\.com/([^/]+)/.+?/.+`), regexp.MustCompile(`^(?:https?://)?api\.github\.com/repos/([^/]+)/([^/]+)/.*`), - regexp.MustCompile(`^(?:https?://)?huggingface\.co/spaces/([^/]+)/([^/]+).*`), - regexp.MustCompile(`^(?:https?://)?cdn-lfs\.hf\.co/repos/.+`), + regexp.MustCompile(`^(?:https?://)?huggingface\.co(?:/spaces)?/([^/]+)/(.+)$`), + regexp.MustCompile(`^(?:https?://)?cdn-lfs\.hf\.co(?:/spaces)?/([^/]+)/([^/]+)(?:/(.*))?$`), regexp.MustCompile(`^(?:https?://)?download\.docker\.com/([^/]+)/.*\.(tgz|zip)$`), } httpClient *http.Client