• Had issues getting WP Super Cache configured on my site (Multisite, I’m using domain mapping and the Caddy web server), so landed on Breeze.

    Unfortunately, it seems to return cached HTML even for requests with the Accept: application/activity+json header, like those from Mastodon instances.

    I have the ActivityPub plugin installed, so requests to individual post or author pages with that header normally get served JSON (using a Fediverse-compatible schema). Without it (or with the “regular” Accept headers that browsers use), WordPress returns “just HTML.” This mechanism is but one example of “content negotiation” (but you probably knew all that).

    Either way, with Breeze enabled, depending on which request comes first, all subsequent requests will see either JSON or HTML. E.g., regular visitors might see JSON, while a Mastodon instance could receive HTML rather than JSON.

    Wondering if it was possible to either (1) exclude “pages” from being cached or being served a cached document, not based on (just) path, but based on Accept header. Maybe using a filter hook or something. Or, (2) ideally, if pages with an “alternative” accept header could be cached also but under a different name (and subsequently served for the appropriate kind of request). Absolutely no expert, but I think this might be called a Vary or some such.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘No ActivityPub (content negotiation) support?’ is closed to new replies.