• Resolved Mikko Saari

    (@msaari)


    Recently I’ve been getting an increased number of complaints from people seeing ActivityPub content. LS Cache stores ActivityPub JSON in the cache. The JSON comes from the same URL, but the ActivityPub request has an Accept: application/activity+json header.

    I have this in my .htaccess file:

    <IfModule LiteSpeed>
    RewriteEngine On
    RewriteCond %{HTTP:Accept} application
    RewriteRule ^ - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+isjson]
    </IfModule>

    I have also enabled the Vary header setting in ActivityPub.

    Despite these efforts, LiteSpeed Cache is regularly caching ActivityPub content in the cache and showing it to regular users whose requests don’t have the Accept: application/activity+json header.

    What else I could do to stop LiteSpeed Cache caching ActivityPub content?

    (This is the same issue as here, and still unsolved.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    and any example page ?

    Thread Starter Mikko Saari

    (@msaari)

    MUHRGBEA. I can’t provide an example page, as I have no control over this problem. Most of the reports are for new posts – a post is published and then someone on Mastodon says the page is all JSON.

    I also don’t have a way to notice when this happens. That would also be helpful, as I could then trigger cache purge for that page.

    Plugin Support qtwrk

    (@qtwrk)

    okay , accept: header method doesn’t work out nicely

    is there any way , that can programatically identify and differentiate the content is normal page or json ?

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.