Skip to content

Commit

Permalink
Fix when no user agent is sent
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-treitos committed Jul 9, 2018
1 parent 7c8d6b0 commit ba7ca62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions waf/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ nw_rules.agent = {
if nw_check_agent then
-- define TARGET to match against rules
local TARGET = ngx.var.http_user_agent
if TARGET == nil then
return true
end

-- check common rules
nw_common_rules.check( TARGET )
Expand Down

0 comments on commit ba7ca62

Please sign in to comment.