mod_tls_policy: Switch method of checking for TLS-encrypted connection
Might deprecate 'session.encrypted', not sure if it's used anywhere
else. This is likely more compatible anyhow.
--- a/mod_tls_policy/mod_tls_policy.lua Thu Sep 09 14:39:13 2021 +0100
+++ b/mod_tls_policy/mod_tls_policy.lua Thu Sep 09 20:27:14 2021 +0200
@@ -11,7 +11,7 @@
module:hook(event_name, function (event)
local origin = event.origin;
- if origin.encrypted then
+ if origin.conn and origin.conn:ssl() then
local info = origin.conn:socket():info();
for key, what in pairs(policy) do
module:log("debug", "Does info[%q] = %s match %s ?", key, tostring(info[key]), tostring(what));