Skip to content

Commit

Permalink
Update init.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
loveshell committed Nov 19, 2013
1 parent 842dec7 commit 339d5eb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ end

function ua()
local ua = ngx.var.http_user_agent
for _,rule in pairs(uarules) do
if rule ~="" and ngxmatch(ua,rule,"isjo") then
log('UA',ngx.var.request_uri,"-",rule)
say_html()
return true
end
if ua ~= nil then
for _,rule in pairs(uarules) do
if rule ~="" and ngxmatch(ua,rule,"isjo") then
log('UA',ngx.var.request_uri,"-",rule)
say_html()
return true
end
end
end
return false
end
Expand Down

0 comments on commit 339d5eb

Please sign in to comment.