From ce819a24acb6b6a5bb3959eb3e5f5481288b4ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Wed, 27 Nov 2013 03:48:25 +0100 Subject: [PATCH] Fix condition on optional Referer header --- access.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/access.lua b/access.lua index 7ac228f..2cd5118 100644 --- a/access.lua +++ b/access.lua @@ -592,8 +592,8 @@ then elseif is_logged_in() -- Authenticated or ngx.var.uri == conf["portal_path"] -- OR Want to serve portal login or (string.starts(ngx.var.uri, conf["portal_path"].."assets") - and ngx.var.http_referer - and string.starts(ngx.var.http_referer, portal_url)) -- OR Want to serve assets for portal login + and (not ngx.var.http_referer + or string.starts(ngx.var.http_referer, portal_url))) -- OR Want to serve assets for portal login then -- Serve normal portal return serve(ngx.var.uri)