修复gist正则匹配
This commit is contained in:
@@ -109,11 +109,11 @@ host = "0.0.0.0"
|
||||
port = 5000
|
||||
# Github文件大小限制(字节),默认2GB
|
||||
fileSize = 2147483648
|
||||
# HTTP/2 多路复用
|
||||
# HTTP/2 多路复用,提升下载速度
|
||||
enableH2C = false
|
||||
|
||||
[rateLimit]
|
||||
# 每个IP每小时允许的请求数(注意Docker镜像会有多个层,会消耗多个次数)
|
||||
# 每个IP每周期允许的请求数(注意Docker镜像会有多个层,会消耗多个次数)
|
||||
requestLimit = 500
|
||||
# 限流周期(小时)
|
||||
periodHours = 3.0
|
||||
|
||||
@@ -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