Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

ssl with cname #247

Closed ghost closed 9 years ago

ghost commented 10 years ago

I have a CNAME record pointing to a bucket, how can i use a signedUrl without .s3.amazonaws.com I can set this.host to just a bucket inside of options.style === 'virtualHosted' if statement and it works.

markstos commented 9 years ago

You can't combine SSL and CNAME on S3. AWS doesn't allow this. This isn't a Knox issue. See here:

http://stackoverflow.com/questions/11201316/how-to-configure-ssl-for-amazon-s3-bucket

domenic commented 9 years ago

Thanks for digging this up and getting us some closure ... boo AWS.

ghost commented 9 years ago

@markstos Yes you are right, but I'm using CloudFlare and it gives me a certificate for my domain. @domenic I used knox to sign the url and the problem was inside the Client function that puts s3.amazonaws.com to the end of host. It's pretty common to use CloudFlare these days. It's not a problem to write own signer, but why not give the possibility to use just the domain.