# prosodyctl mod_http_upload expire-after $(( 60 * 60 * 24 * 31 ))
[email protected]
modulemanager error Error initializing module 'http_upload' on
'*': ...dy/community-modules/mod_http_upload/mod_http_upload.lua:15: File
upload MUST happen with TLS but it isn’t enabled, see
https://prosody.im/doc/http for how to fix this issue
stack traceback:
[C]: in function 'error'
...dy/community-modules/mod_http_upload/mod_http_upload.lua:15: in main
chunk
[C]: in function 'util.xpcall.xpcall'
/usr/lib64/prosody/core/modulemanager.lua:270: in upvalue
'do_load_module'
/usr/lib64/prosody/core/modulemanager.lua:353: in function
'core.modulemanager.load'
/usr/bin/prosodyctl:645: in upvalue 'func'
/usr/lib64/prosody/util/async.lua:144: in function
</usr/lib64/prosody/util/async.lua:142>
Failed to load module 'http_upload':
...dy/community-modules/mod_http_upload/mod_http_upload.lua:15: File upload
MUST happen with TLS but it isn’t enabled, see https://prosody.im/doc/http for
how to fix this issue
stack traceback:
[C]: in function 'error'
...dy/community-modules/mod_http_upload/mod_http_upload.lua:15: in main
chunk
[C]: in function 'util.xpcall.xpcall'
/usr/lib64/prosody/core/modulemanager.lua:270: in upvalue
'do_load_module'
/usr/lib64/prosody/core/modulemanager.lua:353: in function
'core.modulemanager.load'
/usr/bin/prosodyctl:645: in upvalue 'func'
/usr/lib64/prosody/util/async.lua:144: in function
</usr/lib64/prosody/util/async.lua:142>
---
mod_http_upload/mod_http_upload.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mod_http_upload/mod_http_upload.lua
b/mod_http_upload/mod_http_upload.lua
index b2d52dc0..cbffafca 100644
--- a/mod_http_upload/mod_http_upload.lua
+++ b/mod_http_upload/mod_http_upload.lua
@@ -11,7 +11,7 @@
module:depends("http");
module:depends("disco");
-if module:http_url():match("^http://") then
+if (prosody.process_type == "prosody" or prosody.shutdown) and
module:http_url():match("^http://") then
error("File upload MUST happen with TLS but it isn’t enabled, see
https://prosody.im/doc/http for how to fix this issue");
end
--
2.43.0
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prosody-dev/20240127235925.714101-1-autkin%40decent.im.