documentcloud/jammit — pull request #222 by PatrickLef (2012-02-26 09:44:36+00:00)
Title: Possibility to change where CSS url()s is loaded from, to enable CDN for CSS loaded images

This makes it possible to set a host for your assets, which will then be used for the CSSs to change url(/foobar.jpg) to url(http://cdn.example.com/foobar.jpg). Which I needed to be able to put larger images that I don't want to base64 encode in my CDN.

With this came 2 more problems.

1. Cloudfront don't support setting a Access-Control-Allow-Origin header on your files, which means that fonts still have to be loaded from your domain. Therefor I added a setting where you can set which file extensions that should not be loaded from the asset host.

2. While it was possible to set file extensions that shouldn't be loaded from the asset host, that also meant that fonts included from CSS using /font.woff would be loaded from the asset hosts root instead of the web site. Therefor I had to add a setting where you can set where the web host is.

If you find this patch interesting, I would gladly update the docs and write som specs for it!