From 6e2f94f25d68cb377da3255a81479fac260f60ef Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Wed, 9 Jul 2025 16:28:15 +0700 Subject: [PATCH 1/2] Updating ActivityPub paths We do not support running on a subdirectory We need to proxy webfinger requests for AP to work --- Caddyfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Caddyfile b/Caddyfile index 4c5cba5..fa0c017 100644 --- a/Caddyfile +++ b/Caddyfile @@ -14,12 +14,16 @@ reverse_proxy traffic-analytics:3000 } - # Proxy activitypub requests with any prefix (e.g. /.ghost/activitypub/ or /blog/.ghost/activitypub/) - @activitypub_paths path_regexp activitypub_match ^(.*)/\.ghost/activitypub(.*)$ + # Proxy activitypub requests /.ghost/activitypub/ + @activitypub_paths path_regexp activitypub_match ^/\.ghost/activitypub(.*)$ handle @activitypub_paths { reverse_proxy activitypub:8080 } + handle /.well-known/webfinger { + reverse_proxy activitypub:8080 + } + # Default proxy to Ghost handle { reverse_proxy ghost:2368 From afa3bb1ea9f252574d7633adfec896e707689f92 Mon Sep 17 00:00:00 2001 From: James Loh Date: Thu, 10 Jul 2025 15:14:39 +1000 Subject: [PATCH 2/2] Update AP with additional endpoints and make default proxying easier --- Caddyfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Caddyfile b/Caddyfile index fa0c017..14bd1f2 100644 --- a/Caddyfile +++ b/Caddyfile @@ -13,10 +13,10 @@ rewrite * {re.analytics_match.2} reverse_proxy traffic-analytics:3000 } - + + # ActivityPub # Proxy activitypub requests /.ghost/activitypub/ - @activitypub_paths path_regexp activitypub_match ^/\.ghost/activitypub(.*)$ - handle @activitypub_paths { + handle /.ghost/activitypub/* { reverse_proxy activitypub:8080 } @@ -24,7 +24,11 @@ reverse_proxy activitypub:8080 } - # Default proxy to Ghost + handle /.well-known/nodeinfo { + reverse_proxy activitypub:8080 + } + + # Default proxy everything else to Ghost handle { reverse_proxy ghost:2368 }