rails/rails — pull request #15021 by hubertlepicki (2014-05-08 06:15:12+00:00)
Title: Allow custom asset host to be passed in asset_url

Hey,

my use case scenario is as follows: I serve most of the assets from CDN. My CDN does not, however, support CORS. This means, I am more than fine with JavaScript and CSS, however, when I try to load AngularJS templates I get security error in browser.

I have solved the problem by overwritting compute_asset_host method in my project, to allow me to pass :host option to asset_url helpers. This way, I can load Angular templates from the same host as the main application loads from, and the rest of assets are loaded from CDN.

If this would be useful for someone else, please merge :)

Thanks,
Hubert Łępicki