Skip to content

Conversation

@jhb-dev
Copy link
Contributor

@jhb-dev jhb-dev commented Oct 30, 2025

This PR introduces a new optional cacheControl configuration option that allows developers to define the Cache-Control header for uploaded files.

This is particularly useful when using the disablePayloadAccessControl option, where files are served directly from S3. In such setups (for example, when using Hetzner S3), no cache headers are applied by default.

With this new option, developers can explicitly specify cache control policies to improve performance and ensure optimal browser caching behavior.

What?

  • Added a new optional cacheControl property to the S3 plugin configuration.

Why?

  • Some S3-compatible providers (e.g. Hetzner) do not apply cache headers by default.
  • When files are served directly from S3, missing cache headers can result in suboptimal performance.

How?

  • When set, the cacheControl string is passed to the AWS.putObjectCommand function on upload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant