[fix] match protected URIs against URL arguments

This commit is contained in:
opi 2016-04-29 17:27:08 +02:00
parent 3b2bc73df5
commit af53f4d393

View file

@ -204,8 +204,8 @@ function is_protected()
end end
for _, url in ipairs(conf["protected_urls"]) do for _, url in ipairs(conf["protected_urls"]) do
if hlp.string.starts(ngx.var.host..ngx.var.uri, url) if hlp.string.starts(ngx.var.host..ngx.var.uri..hlp.uri_args_string(), url)
or hlp.string.starts(ngx.var.uri, url) then or hlp.string.starts(ngx.var.uri..hlp.uri_args_string(), url) then
return true return true
end end
end end