jcberquist/aws-cfml

Support S3 virtual host URLs when generating presigned URLs

jeremyhalliwell opened this issue · 3 comments

Path style URLs are deprecated, so the S3.generatePresignedURL() method should support virtual host style urls.

Path style: https://s3-eu-west-1.amazonaws.com/foo/bar
Virtual host style: https://foo.s3-eu-west-1.amazonaws.com/bar

Workaround: call com.api.signedUrl() method directly with the correct host and path for virtual host style urls.

@jeremyhalliwell Thank you for the issue, and sorry for the delayed response. I have switched to defaulting to the new virtual host URLs in the S3 service, except where the bucket name contains a .. This is published on ForgeBox at v1.17.0. I would really appreciate testing on your end to verify things work with the new approach. To be clear, I have made the switch service wide, not just for generating presigned URLs.

@jcberquist Great, thank you. Now using the the S3 generatePresignedURL() method and all working fine.

Thanks!