You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a single bug. Do not report multiple bugs in one issue.
It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.
Summary
Lemmy has various endpoints used for AP requests and also by browsers.
Some of these endpoints have overlapping URLs and are also considered cacheable, including headers like cache-control: public, max-age=60.
Lemmy does not currently include the accept header in the list of headers returned in the Vary header, which would inform caches to treat requests by browsers different form requests by ActivityPub clients.
This can lead to cache confusion, where a cache server may serve HTML to ActivityPub clients or activities to web browsers.
Steps to Reproduce
Set up Lemmy with a cache in front of it
Issue request with ActivityPub accept header to prime cache
Uh oh!
There was an error while loading. Please reload this page.
Requirements
Summary
Lemmy has various endpoints used for AP requests and also by browsers.
Some of these endpoints have overlapping URLs and are also considered cacheable, including headers like
cache-control: public, max-age=60
.Lemmy does not currently include the
accept
header in the list of headers returned in theVary
header, which would inform caches to treat requests by browsers different form requests by ActivityPub clients.This can lead to cache confusion, where a cache server may serve HTML to ActivityPub clients or activities to web browsers.
Steps to Reproduce
accept
header to prime cacheaccept
headerTechnical Details
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching#vary
Some caches, most prominently Cloudflare, do not support the
Vary
header, which means that these overlapping URLs are not cacheable by those caches.No
vary
header is returned.Lemmy-ansible currently works around this by explicitly including the
accept
header in the cache key for nginx.Related:
Lemmy Instance Version
0.19.11
Lemmy Instance URL
No response
The text was updated successfully, but these errors were encountered: