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
In practice we only use this endpoint for proxying PDFs so we can probably get away with it always ending in ".pdf"?
NGINX may also need to strip caching-related headers from the third-party response and add its own caching headers in order to get Cloudflare to cach the responses. It looks like NGINX already does this:
The text was updated successfully, but these errors were encountered:
seanh
changed the title
Make sure that PDFs cached by NGINX have URLs ending in ".pdf"
Make sure that PDFs proxied by NGINX have URLs ending in ".pdf"
Sep 22, 2021
seanh
changed the title
Make sure that PDFs proxied by NGINX have URLs ending in ".pdf"
Make sure that PDFs proxied by NGINX do get cached in Cloudflare
Sep 22, 2021
We could also create a Cloudflare page rule for the endpoint, then we wouldn't need to add/remove caching headers and the URLs wouldn't need to end in ".pdf".
We could also create a Cloudflare page rule for the endpoint, then we wouldn't need to add/remove caching headers and the URLs wouldn't need to end in ".pdf".
Created rule today. Waiting a day or two to see results.
The NGINX
/proxy/static/
URLs for proxying PDFs need to end in ".pdf" or Cloudflare won't cache them (regardless of caching headers). See: https://hypothes-is.slack.com/archives/C1MA4E9B9/p1630943273021700?thread_ts=1630925851.005100&cid=C1MA4E9B9In practice we only use this endpoint for proxying PDFs so we can probably get away with it always ending in ".pdf"?
NGINX may also need to strip caching-related headers from the third-party response and add its own caching headers in order to get Cloudflare to cach the responses. It looks like NGINX already does this:
via/conf/nginx/nginx.conf
Lines 86 to 89 in c22a5a0
The text was updated successfully, but these errors were encountered: