add cookie expires document and fix a flaw for session-cookie-expires

This commit is contained in:
liuwei 2018-11-05 17:18:16 +08:00
parent 1e0268ad5b
commit 7aa5834948
4 changed files with 10 additions and 4 deletions

View file

@ -58,7 +58,7 @@ local function set_cookie(self, value)
}
if self.cookie_expires and self.cookie_expires ~= "" then
cookie_data.expires = ngx.cookie_time(tonumber(self.cookie_expires))
cookie_data.expires = ngx.cookie_time(ngx.time() + tonumber(self.cookie_expires))
end
if self.cookie_max_age and self.cookie_max_age ~= "" then