philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

Fix Cloudflare caching unprocessed images #256

Closed mdashlw closed 1 month ago

mdashlw commented 1 month ago

Before you begin


This PR attempts to fix an issue where Cloudflare would cache the original unprocessed image indefinitely by purging cache after a processor asks to replace the original full.ext file.

$ curl -Is https://derpicdn.net/img/download/2024/5/4/3357501.png | grep -i content-length
content-length: 16570965
$ curl -Is https://derpicdn.net/img/2024/5/4/3357501/full.png | grep -i content-length
content-length: 21585362

I cannot really test this fix.