Use local var in nginx lua script (#2287)

as warmly recommended by lua-nginx-module documentation
This commit is contained in:
Maxime Besson 2020-08-25 23:50:54 +02:00
parent 0614c69a91
commit b6ab4d067e
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
auth_request_set $headervalue15 $upstream_http_headervalue15;
auth_request_set $lmcookie $upstream_http_cookie;
access_by_lua '
i = 1
local i = 1
ngx.req.set_header("Cookie",ngx.var.lmcookie)
while true do
if ngx.var["headername"..i] ~= nil then