diff --git a/lib/resty/openidc.lua b/lib/resty/openidc.lua index cbd855f..789f8fb 100644 --- a/lib/resty/openidc.lua +++ b/lib/resty/openidc.lua @@ -53,6 +53,8 @@ local cjson = require("cjson") local cjson_s = require("cjson.safe") local http = require("resty.http") local r_session = require("resty.session") +r_session.session_compressor = "zlib" +r_session.session_cookie_maxsize = 8000 local string = string local ipairs = ipairs local pairs = pairs @@ -1142,6 +1144,8 @@ function openidc.save_as_authenticated(opts,session,json,do_redirect) local current_time = ngx.time() if session == nil then + log(DEBUG, "Compressor " .. r_session.session_compressor) + log(DEBUG, "Cookie Max Size " .. r_session.session_cookie_maxsize) session, session_error = r_session.start(session_opts) if session == nil then log(ERROR, "Error starting session: " .. session_error) @@ -1775,4 +1779,4 @@ function openidc.set_logging(new_log, new_levels) WARN = new_levels.WARN and new_levels.WARN or ngx.WARN end -return openidc \ No newline at end of file +return openidc