From 5ddd72406752fc0d105db46fd73f751dd9729b9f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 16 May 2025 12:49:53 -0500 Subject: [PATCH] Redirect webfinger URIs from thewordnerd.info to GTS. --- hosts/hub/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/hosts/hub/default.nix b/hosts/hub/default.nix index 693c548..204be3a 100644 --- a/hosts/hub/default.nix +++ b/hosts/hub/default.nix @@ -126,8 +126,25 @@ 443 ]; - services.caddy.virtualHosts."thewordnerd.info".extraConfig = - ''redir https://www.thewordnerd.info{uri}''; + services.caddy.virtualHosts."thewordnerd.info".extraConfig = '' + @webfinger { + path /.well-known/webfinger + # query acct=nolan%3Athewordnerd%40info + } + handle @webfinger { + rewrite * /.well-known/webfinger?resource=acct%3Anolan%40gts.thewordnerd.info + reverse_proxy localhost:8081 + } + handle /.well-known/nodeinfo { + reverse_proxy localhost:8081 + } + handle /.well-known/host-meta { + reverse_proxy localhost:8081 + } + handle { + redir https://www.thewordnerd.info{uri} + } + ''; services.caddy.virtualHosts."www.thewordnerd.info".extraConfig = '' file_server