GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    HeathenStorm (heathenstorm@mastodon.social)'s status on Tuesday, 05-Mar-2024 21:49:49 JST HeathenStorm HeathenStorm
    • Matthias Pfefferle
    • Tim Nolte

    Still getting trouble combining the #activitypub and #litespeed cache plugins on my #wordpress site. I’ve implemented Tim Nolte‘s .htaccess changes to vary on Accept type, and that works when manually testing with a browser and Postman. But every now and then the Activitypub JSON gets cached and delivered to a regular browser.

    Has there been a recent change to the accepted application types that the RewriteCond needs to pick up on? If so, which apps use this different type?

    @pfefferle @tim

    In conversation about a year ago from mastodon.social permalink
    • Embed this notice
      Matthias Pfefferle (pfefferle@mastodon.social)'s status on Tuesday, 05-Mar-2024 21:49:43 JST Matthias Pfefferle Matthias Pfefferle
      in reply to
      • Tim Nolte

      @tim @heathenstorm what? I am not aware the I use uppercase JSON anywhere!

      In conversation about a year ago permalink
    • Embed this notice
      HeathenStorm (heathenstorm@mastodon.social)'s status on Tuesday, 05-Mar-2024 21:49:48 JST HeathenStorm HeathenStorm
      in reply to
      • Matthias Pfefferle
      • Tim Nolte

      @pfefferle @tim Found the problem!

      The ActivityPub plugin returns JSON regardless of the case of the Accept header. (So application/json and application/JSON will both work.)

      However, Tim's RewriteCond is case sensitive, so only the correctly formatted application/json header will trigger the vary fix.

      Slapping [NC] at the end of the RewriteCond does the job.

      #activitypub #wordpress #litespeedcache

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Tuesday, 05-Mar-2024 21:49:48 JST Tim Nolte Tim Nolte
      in reply to
      • Matthias Pfefferle

      @heathenstorm wait the #ActivityPub plugin is incorrectly using `JSON` in all uppercase? I'm going to have to fix my rewrite to account for this, even though I think this should be corrected in the plugin.

      @pfefferle

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Tuesday, 05-Mar-2024 23:38:30 JST Tim Nolte Tim Nolte
      in reply to
      • Matthias Pfefferle

      @heathenstorm ah, OK, that is good to know. I'm planning on submitting a request for code changes to the LiteSpeed Cache plugin to support ActivityPub and so I'll update my rewrite rule to be case insensitive.

      @pfefferle

      In conversation about a year ago permalink
    • Embed this notice
      HeathenStorm (heathenstorm@mastodon.social)'s status on Tuesday, 05-Mar-2024 23:38:31 JST HeathenStorm HeathenStorm
      in reply to
      • Matthias Pfefferle
      • Tim Nolte

      @tim @pfefferle

      It's the Accept: header coming from a random third party, not the plugin.

      My hosting doesn't log that header, but I'd guess that third party is sending an Accept with incorrect casing.

      The .htaccess RewriteCond didn't pick it up, so didn't add the Cache-Control:vary suffix.

      However, the ActivityPub plugin matched the header regardless of case and returned the activitystreams json as expected. Which may be correct behaviour in itself.

      It is then returned for all Accept types

      In conversation about a year ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        itself.it
        This domain may be for sale!

      Matthias Pfefferle repeated this.
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Tuesday, 05-Mar-2024 23:38:33 JST Tim Nolte Tim Nolte
      in reply to
      • Matthias Pfefferle

      @heathenstorm @pfefferle also, if this is with the latest version of the plugin then it would be confirmed that the recent changes of adding the Vary: Accept header wasn't actually a complete fix.

      In conversation about a year ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.