4 ms·
One cool trick for serving mixed http/https that I somehow went 10 years without finding out: you can just point your Rails asset_host to "//d3vam04na8c92l.clou
by nthj 13y ago
One cool trick for serving mixed http/https that I somehow went 10 years without finding out: you can just point your Rails asset_host to "//d3vam04na8c92l.cloudfront.net". Browsers understand this to mean "Look up this address via whatever protocol I am currently on, http if http, https if over SSL."
This is a huge cache boost in Rails because you don't have to cache your pages twice (once for HTTP once for HTTPs.)
- girvo 13y agoOh god.. While your post is cool, I reacted violently to the "One cool trick..." part at the beginning. Upworthy, you've broken me.