kotx / render

Cloudflare Worker to proxy and cache requests to R2
MIT License
384 stars 85 forks source link

Allow caching directory listings #22

Closed Erisa closed 1 year ago

Erisa commented 1 year ago

Adds a simple DIRECTORY_CACHE_CONTROL option to control the otherwise hardcoded Cache-Control header on directory listing responses. Also place the directory listing into Cloudflare cache if configured to do so.

The new option defaults to no-store and will be treated as no-store if not present. This is backwards compatible with previous versions.