Looked at the code and I got it working. Had a couple problems with my proxy config:
-
Wasn’t forwarding the authorization header.
-
Was rewriting the url needlessly.
I’m using nginx for my reverse proxy. Here’s what finally worked:
location ~ ^/.ghost/activitypub(?/.*)?$ {
proxy_pass ``http://127.0.0.1:8080``; # keep the /.ghost/activitypub prefix intact
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Authorization $http_authorization;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_no_cache 1;
proxy_cache_bypass 1;
}
Some of the calls between the Ghost and ActivityPub containers were failing I think due to the missing auth header. Forwarding $host is critical too too. It uses that to know what site it’s registering.
Nginx isn’t running inside the docker network but it is running on the same box, hence the 127.0.0.1. You’ll have to adjust that for your specific situation but if you’re using CloudFlare you probably know what to do there.
Once I had that in place and restarted Nginx, toggling “Network” off and on again did the trick.