From b0cdf474a8c8da4afcfba6e9cca3f89f04708f81 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 17 Apr 2021 20:08:33 +0200 Subject: [PATCH] Fediverse: Move Secure Fetch documentation to the 'Usage' section --- plugins/Fediverse/plugin.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/plugins/Fediverse/plugin.py b/plugins/Fediverse/plugin.py index b7d249d9d..695c3b502 100644 --- a/plugins/Fediverse/plugin.py +++ b/plugins/Fediverse/plugin.py @@ -114,7 +114,30 @@ class FediverseHttp(httpserver.SupyHTTPServerCallback): class Fediverse(callbacks.PluginRegexp): - """Fetches information from ActivityPub servers.""" + """Fetches information from ActivityPub servers. + + Enabling Secure Fetch + ^^^^^^^^^^^^^^^^^^^^^ + + The default configuration works with most ActivityPub servers, but not + all of them, because they require an HTTP Signature to fetch profiles + and statuses. + + Because of how HTTP Signatures work, you need to add some configuration + for Limnoria to support it. + + First, you should set ``supybot.servers.http.port`` to a port you want + your bot to listen on (by default it's 8080). If there are already + plugins using it (eg. if Fediverse is already running), you should + either unload all of them and load them back, or restart your bot. + + Then, you must configure a reverse-proxy in front of your bot (eg. nginx), + and it must support HTTPS. + + Finally, set ``supybot.servers.http.publicUrl`` to the public URL of this + server (when opening this URL in your browser, it should show a page with + a title like "Supybot web server index"). + """ threaded = True regexps = ["usernameSnarfer", "urlSnarfer_"]