This commit is contained in:
2024-03-01 17:09:43 +01:00
parent d8d9fd9e67
commit e7fa66e938
7 changed files with 18 additions and 61 deletions
+3 -15
View File
@@ -1,7 +1,8 @@
plugin_paths = { "/usr/local/lib/prosody/custom-modules/" };
-- table of enabled modules
local mods_enabled = {
-- local mods_enabled = {
modules_enabled = {
-- Generally required
"roster"; -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
@@ -48,19 +49,7 @@ local mods_enabled = {
"server_contact_info"; -- This module lets you advertise various contact addresses for your XMPP service via XEP-0157.
};
local enabled = os.getenv("ENABLE_FIREWALL") or "false"
local spam_blocklist = os.getenv("SPAM_BLOCKLIST") and "/usr/local/etc/prosody/firewall/" .. os.getenv("SPAM_BLOCKLIST") or "module:scripts/spam-blocklists.pfw"
if(enabled == "true")
then
table.insert(mods_enabled, "firewall");
firewall_scripts = {
spam_blocklist;
}
end
modules_enabled = mods_enabled;
-- modules_enabled = mods_enabled;
-- These modules are auto-loaded, but should you want
-- to disable them then uncomment them here:
@@ -69,4 +58,3 @@ modules_disabled = {
-- "c2s"; -- Handle client connections
-- "s2s"; -- Handle server-to-server connections
};