Is there a way to set a cache-control: max-age header for uploading images? I'm using the S3 adapter so I'm not sure this should be implemented somewhere globally within Payload or inside the plugin config.
Currently, we allow passing through the
express-fileupload
package's options into
upload
on the payload config. I do not see anything in their docs about setting headers, so this might be something we'll need to add. What would be the ideal experience for this in your mind? Allowing a headers object or function to allow header logic? We're definitely open to allowing this.
We allow custom express middleware to be passed through, but this would obviously have to have logic around when to set the cache-control header, because you wouldn't want it on every request.
Did you find a solution?
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.