From a5c51421562c8bb086ec203677850d42558dfda1 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 21 Apr 2023 15:12:59 +0200 Subject: [PATCH] flora-6: pub.solar webfinger should redirect to mastodon, if the query parameter matches resource See: https://docs.joinmastodon.org/spec/webfinger/ and: https://docs.joinmastodon.org/admin/config/#web_domain --- hosts/flora-6/caddy.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/flora-6/caddy.nix b/hosts/flora-6/caddy.nix index 9a1a3250..2f6970b5 100644 --- a/hosts/flora-6/caddy.nix +++ b/hosts/flora-6/caddy.nix @@ -36,8 +36,12 @@ redir https://mastodon.pub.solar{uri} } - # Tailscale OIDC requirement + # Tailscale OIDC webfinger requirement plus Mastodon webfinger redirect handle /.well-known/webfinger { + # Redirect requests that match /.well-known/webfinger?resource=* to Mastodon + handle query resource=* { + redir https://mastodon.pub.solar{uri} + } respond 200 { body `{ "subject": "acct:admins@pub.solar",