keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

Content negotiation for fediverse (activitypub) compatibility #326

Closed futtta closed 9 months ago

futtta commented 1 year ago

When using the ActivityPub plugin by @pfefferie WordPress outputs JSON when the Accept request header is application/json. This requires changes at page caching layer to avoid (a) the JSON output being cached and served to "normal" browsers and (b) that ActivityPub requests get served HTML from the page cache.

This PR does that for Cache Enabler.