In my testing I was unable to get signed URLs with CloudFront working. This appears to be because of the way the stream wrapper handles the $this->domain variable. Specifically the bit in the constructor where you check to see if there is a custom domain/cname and than make use of it if present. The fact that it's adding a "//" to the beginning of the domain is causing my signed URLs to come out like

"////asdfasdfasdf.cloudfront.net/myfile.mp4"

Which doesn't work. I've made some changes to the code that are working for me, and I can properly generated signed cloudfront URLs now. I also inspected the URL generated in various other configurations and it seems to be working fine still. So here's my attempt at fixing this.

CommentFileSizeAuthor
amazons3-fix_domain_handling.patch1.11 KBeojthebrave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

justafish’s picture

justafish’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.