Skip to content

Commit

Permalink
fix: 网关路径校验支持fs-server #2801
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlxu authored Dec 6, 2024
1 parent 794126e commit 53198cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gateway/lua/router_srv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ if security_paths ~= nil and #security_paths ~= 0 then
local path = ngx.var.uri
for _, item in ipairs(security_paths) do
local pathPattern = "/web/" .. service_name .. item.path
if service_name == "fs-server" then
pathPattern = "/web/fs%-server" .. item.path
end
if string.find(path, "^" .. pathPattern) ~= nil and service_name == item.service and method == item.method then
is_secure = true
end
Expand Down

0 comments on commit 53198cd

Please sign in to comment.