flownative / flow-aws-s3

Amazon S3 adaptor for Neos and Flow
MIT License
18 stars 33 forks source link

BUGFIX: Fix setting base uri for static resources #14

Closed liwo closed 6 years ago

liwo commented 7 years ago

This change allows setting a base uri for static resources like the existing behaviour with base uri for persistent resources.

Fixes #17

kdambekalns commented 7 years ago

@liwo Can you give me an example under what circumstances this makes sense? It's probably just me, but I don't get how this can lead to working resource URLs… 😊

liwo commented 7 years ago

If you compare this to getPublicPersistentResourceUri() in line 303 this implements the same logic for static resources. This makes sense if you publish static resources to S3 and have a CloudFront distribution in front of S3. We need to publish static resources to S3 because during a deployment we have about 1 minute during which the ELB uses both old and new instances and if CloudFront tries to fetch a new resource from the ELB this fails in ~50% of the cases (because an old instance is used).