[fix] Use local variables for cookie's expired_time.

This commit is contained in:
opi 2017-02-28 15:38:46 +01:00
parent 6bd8eb1a90
commit fff95314ce

View file

@ -132,7 +132,7 @@ end
function delete_cookie()
conf = config.get_config()
expired_time = "Thu, 01 Jan 1970 00:00:00 UTC;"
local expired_time = "Thu, 01 Jan 1970 00:00:00 UTC;"
for _, domain in ipairs(conf["domains"]) do
local cookie_str = "; Domain=."..domain..
"; Path=/"..
@ -149,7 +149,7 @@ end
-- Expires the redirection cookie
function delete_redirect_cookie()
expired_time = "Thu, 01 Jan 1970 00:00:00 UTC;"
local expired_time = "Thu, 01 Jan 1970 00:00:00 UTC;"
local cookie_str = "; Path="..conf["portal_path"]..
"; Expires="..expired_time..
"; Secure"