When the WordPress ActivtyPub plugin does not work for your site

I added the ActivityPub plugin to my WordPress installation a while ago and was wondering why it didn’t seem to work. Today I discovered an ActivtyPub warning on the Site Health Status page saying …

Your WebFinger endpoint https://blog.dummzeuch.de/.well-known/webfinger?resource=acct:dummzeuch@blog.dummzeuch.de does not return valid JSON for application/jrd+json.

… that suspiciously sounded like it might be the reason.

Investigating that further, it turned out that the Disable WP REST API plugin which I also have installed to improve the security of my site, blocks that url. I verified that by temporarily disabling the plugin and could successfully request that url from a browser that was not logged into the site. But that’s of course not a permanent solution.

The author of that plugin posted a workaround to get a contact form plugin to work with the plugin. That looked like possible solution, but I have yet to figure out how to apply this to my particular problem.