From e397272fe8550e4f81958d5d00bf3233e1bd0bfc Mon Sep 17 00:00:00 2001 From: Daenney Date: Wed, 8 Mar 2023 13:57:41 +0100 Subject: [feature] Discover webfinger through host-meta (#1588) * [feature] Discover webfinger through host-meta This implements a fallback for discovering the webfinger endpoint in case the /.well-known/webfinger endpoint wasn't properly redirected. Some instances do this because the recommendation used to be to use host-meta for the webfinger redirect in the before times. Closes #1558. * [bug] Ensure we only ever update cache on success * [chore] Move finger tests to their own place This adds a test suite for transport and moves the finger cache tests into there instead of abusing the search test suite. * [chore] cleanup the test a bit more We don't really need a separate function for the oddly located webfinger response as we check the full URL string anyway * Address review comments * [chore] update config example * [chore] access DB only through state in controller --- internal/config/defaults.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/config/defaults.go') diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 7d2427ee7..418858827 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -166,6 +166,10 @@ var Defaults = Configuration{ UserMaxSize: 100, UserTTL: time.Minute * 5, UserSweepFreq: time.Second * 30, + + WebfingerMaxSize: 250, + WebfingerTTL: time.Hour * 24, + WebfingerSweepFreq: time.Minute * 15, }, }, -- cgit v1.2.3