From 88309b1a44fb6d41fa160936e0745d2a3192a598 Mon Sep 17 00:00:00 2001 From: "telepath.im" Date: Wed, 19 Jun 2024 17:00:11 +0200 Subject: [PATCH] Added an invites page and web registration form --- etc/caddy/conf.d/telepath.caddy | 6 +++++- etc/prosody/prosody.cfg.lua | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/etc/caddy/conf.d/telepath.caddy b/etc/caddy/conf.d/telepath.caddy index 11beeb3..6e16618 100755 --- a/etc/caddy/conf.d/telepath.caddy +++ b/etc/caddy/conf.d/telepath.caddy @@ -1,6 +1,6 @@ telepath.im www.telepath.im { # Website - root * /srv/http/telepath + root * /var/www/html/telepath file_server # XMPP host-meta @@ -19,6 +19,10 @@ telepath.im www.telepath.im { respond /.well-known/host-meta.json 200 { body `{"links":[{"rel":"urn:xmpp:alt-connections:xbosh","href":"https://hypertext.telepath.im/http-bind"},{"rel":"urn:xmpp:alt-connections:websocket/","href":"wss://hypertext.telepath.im/xmpp-websocket/"}]}` } + + reverse_proxy /invite* localhost:5280 + reverse_proxy /register* localhost:5280 + reverse_proxy /share* localhost:5280 } # XMPP HTTP file upload service diff --git a/etc/prosody/prosody.cfg.lua b/etc/prosody/prosody.cfg.lua index 7373ae1..b969481 100644 --- a/etc/prosody/prosody.cfg.lua +++ b/etc/prosody/prosody.cfg.lua @@ -76,7 +76,10 @@ modules_enabled = { "http_altconnect"; "lastactivity"; "privilege"; - "block_registrations" + "block_registrations"; + "invites_register_web"; + "invites_page"; + "http_libjs" } -- These modules are auto-loaded, but should you want @@ -235,6 +238,16 @@ expose_publisher = true VirtualHost "telepath.im" +-- Invites +-- See https://modules.prosody.im/mod_invites.html + +invites_page = "https://telepath.im/invite?{invite.token}" +http_external_url = "https://telepath.im/" +http_paths = { + invites_page = "/invite"; + invites_register_web = "/register"; +} + ------ Components ------ -- See https://prosody.im/doc/components