silverstripe / silverstripe-s3

Silverstripe module to store assets in S3 rather than on the local filesystem (SS4/SS5 only)
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

BUG Disable Asset-admin cache busting to avoid invalidating request signature #43

Closed maxime-rainville closed 3 years ago

maxime-rainville commented 3 years ago

When linking to a private file, the S3 adapter adds a "signature" parameter to the file which AWS validates before letting you see the file. However, Asset-admin adds a vid parameter to some preview URLs to bust browser caches which invalidates the signature.

We've added a new config flag to asset admin that disables this cache busting logic. https://github.com/silverstripe/silverstripe-asset-admin/pull/1119

This PR updates the s3 module to automaticly disable cache busting.

Parent issue

maxime-rainville commented 3 years ago

For whoever picks up the peer review for this, I've added some explanation to get a basic project set up https://github.com/silverstripe/silverstripe-s3/pull/44

obj63mc commented 3 years ago

Looks good. Thanks all