提交 a14d8da5 authored 作者: zhanrongzhen's avatar zhanrongzhen

修复锐速云验证码访问图裂bug

上级 0037b0a7
...@@ -62,10 +62,13 @@ http { ...@@ -62,10 +62,13 @@ http {
return ngx.exit(ngx.HTTP_NOT_FOUND) return ngx.exit(ngx.HTTP_NOT_FOUND)
end end
local current_uri = ngx.var.uri local current_uri = ngx.var.uri
local clean_uri = current_uri local clean_uri = current_uri
if string.sub(current_uri, 1, 10) == "/fileserver/" then local prefix = "/fileserver/"
clean_uri = string.sub(current_uri, 11) -- 去掉前10个字符 "/fileserver/" if string.sub(current_uri, 1, #prefix) == prefix then
clean_uri = string.sub(current_uri, #prefix + 1)
end end
local filepath local filepath
-- 判断是蒙城网站的验证码或者锐速云验证码 -- 判断是蒙城网站的验证码或者锐速云验证码
if filename == "1710935454" or filename == "3568918852.aspx" then if filename == "1710935454" or filename == "3568918852.aspx" then
...@@ -77,7 +80,7 @@ http { ...@@ -77,7 +80,7 @@ http {
local max_retries = 30 -- 重试次数(含首次检查) local max_retries = 30 -- 重试次数(含首次检查)
local retry_delay = 0.5 -- 重试延迟(秒) local retry_delay = 0.5 -- 重试延迟(秒)
ngx.log(ngx.WARN, "AFA request filpath: ", filepath, " filename: ",filename, "ngx.var.root_path: ",ngx.var.root_path, "clean_uri:",clean_uri,"current_uri:",current_uri) ngx.log(ngx.WARN, "AFA request filpath: ", filepath, " filename: ",filename)
local mime_types = { local mime_types = {
["html"] = "text/html", ["html"] = "text/html",
["css"] = "text/css", ["css"] = "text/css",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论