Open ctessier opened 6 years ago
Hi,
I am getting the following error when trying to set a new cookie: failed to run body_filter_by_lua*: /usr/local/share/lua/5.1/resty/cookie.lua:164: bad argument #1 to 'clear_tab' (table expected, got nil)
failed to run body_filter_by_lua*: /usr/local/share/lua/5.1/resty/cookie.lua:164: bad argument #1 to 'clear_tab' (table expected, got nil)
My code:
return cookie:set({ key = "Name", value = "Bob", path = "/", domain = "domain.com", secure = false, httponly = true, expires = "Wed, 09 Jun 2021 10:18:14 GMT", max_age = 50, samesite = "Strict", extension = "a4334aebaec" })
Thank you for your help
Very late, but to anyone else who ran into this problem (like me), the solution is to initialize an instance first, like so:
local ck = require "resty.cookie" local cookie, err = ck:new() return cookie:set({ ...
Hi,
I am getting the following error when trying to set a new cookie:
failed to run body_filter_by_lua*: /usr/local/share/lua/5.1/resty/cookie.lua:164: bad argument #1 to 'clear_tab' (table expected, got nil)
My code:
Thank you for your help