v1.2.5 - performance improvement

This commit is contained in:
bunkerity 2021-05-14 16:42:08 +02:00
parent 2f115c444d
commit b0ca85ff75
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
3 changed files with 4 additions and 4 deletions

View File

@ -24,5 +24,5 @@ jobs:
exit-code: '1'
ignore-unfixed: true
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL'
skip-dirs: '/usr/lib/go'

View File

@ -1 +1 @@
1.2.4
1.2.5

View File

@ -134,7 +134,7 @@ if use_tor_exit_nodes then
end
-- check if user-agent is allowed
if use_user_agents then
if use_user_agents and ngx.var.http_user_agent ~= nil then
local whitelisted = false
for k, v in pairs(whitelist_user_agent) do
if string.match(ngx.var.http_user_agent, v) then
@ -167,7 +167,7 @@ if use_user_agents then
end
-- check if referrer is allowed
if use_referrer then
if use_referrer and ngx.var.http_referer ~= nil then
local value, flags = ngx.shared.referrers_cache:get(ngx.var.http_referer)
if value == nil then
local patterns = ngx.shared.referrers_data:get_keys(0)