Software /
code /
prosody-modules
File
mod_disable_tls/mod_disable_tls.lua @ 4888:dc7c9ae15f43
mod_rest: Ensure mod_http is loaded before API demo
Fixes an error as it tried to use module:http_url() which doesn't exist
before mod_http is loaded
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 08 Feb 2022 13:51:41 +0100 |
parent | 1482:25be5fde250f |
line wrap: on
line source
local disable_tls_ports = module:get_option_set("disable_tls_ports", {}); module:hook("stream-features", function (event) if disable_tls_ports:contains(event.origin.conn:serverport()) then module:log("error", "Disabling TLS for client on port %d", event.origin.conn:serverport()); event.origin.conn.starttls = false; end end, 1000);