3

How does one go about serving asset files stored in cloud locations over SSL?

For S3, serving assets over SSL is simply a matter of changing 'http' to 'https'. However, Rackspace uses completely different domains for their SSL. This creates a situation where http://container1.rscf.com/myfile.jpg mightb be served over https://weird.something.rscf.com/myfile.jpg.

There just seems like there should be a property in the getUrlForFile method in AssetsService.php that helps with this, but I'm not seeing it.

3

Personally, I would just go with S3 (I've ranted about this before), but I understand that sometimes your hand is forced.

I was not even aware that Rackspace supported SSL or that it would be a different domain. I did some digging through their docs and it seems there'll be some work involved to get this feature in and it will cause a change in behaviour, so I'd say this will have to wait until 2.2.

  • For most projects, S3 is the choice. However, hands are forced and Rackspace is required. Is there any way you guys can add hook to manipulate asset urls in the meantime? – Wes Rice Jul 23 '14 at 19:39
  • Okay, so let's try the simple way. What's stopping you from going into Rackspace MyCloud console, looking up the container HTTPS URL there and just use that in your Source settings? – Andris Sevcenko Jul 24 '14 at 5:28
  • Good point. Not every environment uses the SSL. So I'm guessing I should be able to put the appropriate container url in my 'environmentVariables' array in general.php and be able to utilize that variable in the source settings? – Wes Rice Jul 24 '14 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.