dadi / cdn

CDN is a Just-in-time asset manipulation and delivery application, providing a complete content distribution/delivery solution
https://dadi.cloud/en/cdn
Other
217 stars 43 forks source link

Add aws sdk s3ForcePathStyle option #504

Closed nika-begiashvili closed 5 years ago

nika-begiashvili commented 5 years ago

Some non aws S3 implementations do not serve objects at bucket.region.endpoint location but rather use endpoint/bucket style. to facilitate this kind of behavior aws-sdk-js provides s3ForcePathStyle option. this pull request exposes that option to cdn config

jimlambie commented 5 years ago

@nika-begiashvili I'm adding a unit test to the application to prove this change does what we expect it to. Are you able to provide me with a sample configuration?

jimlambie commented 5 years ago

@nika-begiashvili In addition to the above request for sample configuration details, can you give us any more details about the S3-like service you are using? You mention "some non-AWS S3 implementations" (of which Digital Ocean Spaces is one), but in order for us to ensure we support your requirement we will need to test against the same service you wish to use.

cc @eduardoboucas

nika-begiashvili commented 5 years ago

@jimlambie thank you for support, but I'm starting to doubt this PR, since this is deprecated way to use S3 I believe better option would be to rewrite url using reverse proxy the storage I'm using is caringo swarm which unfortunately is not open-source, maybe fake-s3 or pithos has path style access but I'm not sure

nika-begiashvili commented 5 years ago

I've managed to make it work without this PR, using reverse proxy to rewrite urls I'm closing this PR

eduardoboucas commented 5 years ago

@nika-begiashvili thanks for the update. And do let us know if there's anything we can help you with in the future!