WP Supercache seems to ignore non-default “Accept” header
-
I am running WordPress 6.3.2 with Jetpack, Akismet, WP Supercache, AddToAny, and the ActivityPub suite, under NGINX
If I disable Supercache, my ActivityPub plugin works fine and my posts are visible to Mastodon, etc.
If I enable Supercache, they stop working, because as described at:
https://github.com/Automattic/wordpress-activitypub/discussions/446#discussioncomment-7332341
and also:
https://github.com/Automattic/wordpress-activitypub/discussions/446#discussioncomment-7332671
…when Supercache is enabled the page at
https://alecmuffett.com/article/author/alecm
stops honouring theAccept: application/activity+json
header, and returns cached HTML irrespective of the request for JSON.I’ve tried it with Supercache in Simple mode, and with it in Expert mode although with the latter I have, of course, had to manually tune NGINX to tune the accelerated page fetches; this has been complicated by the apparent behaviour that even in Expert mode, Supercache seems to fall back to PHP/Simple caching in the event that the request was not served directly out of NGINX? If so, it seems like even a move to “Expert” caching and making NGINX ignore the static-cached page for that URL when
Accept
is nottext/html
, is doomed as a potential solution.(update: I came to this conclusion because I switched on NGINX without modifying the NGINX config to serve cached pages direct from the filesystem… and I was astonished to find that I was still serving cached content. I’ve not tried debugging this before, but I presume that this means “when expert mode is enabled, simple/php-caching is still enabled as a fallback?” ; if so this makes it very hard to determine which mechanism is serving the cached content without (as I did) enabling NGINX low-level debugging.)
At the moment I have got Supercache switched off because it’s important to me that my ActivityPub work. I am happy to “Restore defaults” and debug that way if anyone wants.
The page I need help with: [log in to see the link]
- The topic ‘WP Supercache seems to ignore non-default “Accept” header’ is closed to new replies.