修复gist正则匹配
This commit is contained in:
@@ -8,7 +8,7 @@ fileSize = 2147483648
|
||||
enableH2C = false
|
||||
|
||||
[rateLimit]
|
||||
# 每个IP每小时允许的请求数(注意Docker镜像会有多个层,会消耗多个次数)
|
||||
# 每个IP每周期允许的请求数
|
||||
requestLimit = 500
|
||||
# 限流周期(小时)
|
||||
periodHours = 3.0
|
||||
|
||||
@@ -20,7 +20,7 @@ var (
|
||||
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:blob|raw)/.*`),
|
||||
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:info|git-).*`),
|
||||
regexp.MustCompile(`^(?:https?://)?raw\.github(?:usercontent|)\.com/([^/]+)/([^/]+)/.+?/.+`),
|
||||
regexp.MustCompile(`^(?:https?://)?gist\.github(?:usercontent|)\.com/([^/]+)/.+?/.+`),
|
||||
regexp.MustCompile(`^(?:https?://)?gist\.(?:githubusercontent|github)\.com/(.+?)/(.+?)/.+\.[a-zA-Z0-9]+$`),
|
||||
regexp.MustCompile(`^(?:https?://)?api\.github\.com/repos/([^/]+)/([^/]+)/.*`),
|
||||
regexp.MustCompile(`^(?:https?://)?huggingface\.co(?:/spaces)?/([^/]+)/(.+)`),
|
||||
regexp.MustCompile(`^(?:https?://)?cdn-lfs\.hf\.co(?:/spaces)?/([^/]+)/([^/]+)(?:/(.*))?`),
|
||||
|
||||
Reference in New Issue
Block a user