rstacruz / sinatra-assetpack

Package your assets transparently in Sinatra.
http://ricostacruz.com/sinatra-assetpack/
MIT License
542 stars 97 forks source link

No way to set asset_host for non-production environments #137

Open acatighera opened 10 years ago

acatighera commented 10 years ago

Looking through the docs I tried to use environment variables HOST/CDN_HOST but that did not do the trick either.

I need to set up a cdn host for my staging environment.

lukesmith commented 10 years ago

I had a similar issue where we didn't want the cdn being used for staging and worked around it by conditionally setting the asset_hosts

asset_hosts %w(//xxxxxxxxxx.cloudfront.net) if app.settings.production?

You could do something similar if you have a setting that indicates it's staging?