وردپرس

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 the Accept: 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 not text/html, is doomed as a potential solution.

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]

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا