@webaware @tim the problem is, that the plugin does not query a lot with the accept header, but receives a lot of requests, so I think we have to request that for Mastodon and others?!?
Conversation
Notices
-
Embed this notice
Matthias Pfefferle (pfefferle@mastodon.social)'s status on Sunday, 19-Mar-2023 17:23:38 JST Matthias Pfefferle -
Embed this notice
Ross McKay (webaware@fosstodon.org)'s status on Sunday, 19-Mar-2023 17:23:40 JST Ross McKay Does OpenLiteSpeed honour the header "Vary: Accept"? From examples I've seen, it honours other Vary values. You should be able to get separate caches for each Accept value – not just text/html and application/activity+json but any others sent.
Try setting that header in the plugin, clear the OpenLightSpeed cache, and test.
header('Vary: Accept');
@pfefferle do you plan to add that to the plugin? It should automatically fix nginx, and any other caches that support Vary headers.
-
Embed this notice
Tim Nolte (tim@mastodon.timnolte.com)'s status on Sunday, 19-Mar-2023 17:23:44 JST Tim Nolte OK, so for people using the #ActivityPub #WordPress plugin from @pfefferle and are using caching that causes problems with return #JSON to web visitor, instead of #HTML, or HTML to ActivityPub requests instead of JSON, I think I have a working solution. I have just finally got around to testing my theory on my #OpenLiteSpeed server by leveraging a Rewrite Rule. I haven't fully confirmed if the requests are being cached.
1/2
-
Embed this notice