From b0ca85ff75bc229dabab2c286c3d7fbceeaeebeb Mon Sep 17 00:00:00 2001 From: bunkerity Date: Fri, 14 May 2021 16:42:08 +0200 Subject: [PATCH] v1.2.5 - performance improvement --- .github/workflows/autotest-bunkerized-nginx.yml | 2 +- VERSION | 2 +- confs/site/main-lua.conf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/autotest-bunkerized-nginx.yml b/.github/workflows/autotest-bunkerized-nginx.yml index 4b3814c..503104d 100644 --- a/.github/workflows/autotest-bunkerized-nginx.yml +++ b/.github/workflows/autotest-bunkerized-nginx.yml @@ -24,5 +24,5 @@ jobs: exit-code: '1' ignore-unfixed: true severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL' - + skip-dirs: '/usr/lib/go' diff --git a/VERSION b/VERSION index e8ea05d..c813fe1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.4 +1.2.5 diff --git a/confs/site/main-lua.conf b/confs/site/main-lua.conf index 906270e..0506663 100644 --- a/confs/site/main-lua.conf +++ b/confs/site/main-lua.conf @@ -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)