1
0
Fork 0
forked from mirror/prosody
prosody/conf.d/05-vhost.cfg.lua
Sara Aimée Smiseth da2f438bda
Add ENV variables for http_max_content_size and http_upload_file_size_limit (#57)
Fixes #55 and fixes #56:

* Add environment variable HTTP_UPLOAD_FILE_SIZE_LIMIT for setting http_upload_file_size_limit
* Add environment variable HTTP_MAX_CONTENT_SIZE
* Add domain_http_upload to disco_items to support http_upload on some clients and if http_upload is not a subdomain
2023-09-07 17:48:56 +02:00

47 lines
1.5 KiB
Lua

local domain = os.getenv("DOMAIN")
local domain_http_upload = os.getenv("DOMAIN_HTTP_UPLOAD")
local domain_muc = os.getenv("DOMAIN_MUC")
local domain_proxy = os.getenv("DOMAIN_PROXY")
local domain_pubsub = os.getenv("DOMAIN_PUBSUB")
-- XEP-0368: SRV records for XMPP over TLS
-- https://compliance.conversations.im/test/xep0368/
legacy_ssl_ssl = {
certificate = "certs/" .. domain .. "/fullchain.pem";
key = "certs/" .. domain .. "/privkey.pem";
}
legacy_ssl_ports = { 5223 }
-- https://prosody.im/doc/certificates#service_certificates
-- https://prosody.im/doc/ports#ssl_configuration
https_ssl = {
certificate = "certs/" .. domain_http_upload .. "/fullchain.pem";
key = "certs/" .. domain_http_upload .. "/privkey.pem";
}
VirtualHost (domain)
disco_items = {
{ domain_http_upload },
}
-- Set up a http file upload because proxy65 is not working in muc
Component (domain_http_upload) "http_upload"
http_upload_expire_after = 60 * 60 * 24 * 7 -- a week in seconds
http_upload_file_size_limit = os.getenv("HTTP_UPLOAD_FILE_SIZE_LIMIT") or 1024 * 1024 -- Default is 1MB
Component (domain_muc) "muc"
name = "Prosody Chatrooms"
restrict_room_creation = false
max_history_messages = 20
modules_enabled = {
"muc_mam",
"vcard_muc"
}
-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers
Component (domain_proxy) "proxy65"
proxy65_address = domain_proxy
proxy65_acl = { domain }
-- Implements a XEP-0060 pubsub service.
Component (domain_pubsub) "pubsub"