Created
          November 27, 2012 21:38 
        
      - 
      
 - 
        
Save ryanb/4157256 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
ryanb created this gist
Nov 27, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ class AssetHeaders def initialize(app) @app = app end def call(env) request = Rack::Request.new(env) response = @app.call(env) if request.path =~ /^\/assets\// # there maybe a better way to add headers response[1]["Access-Control-Allow-Origin"] = "*" end response end end Railscasts::Application.configure do config.middleware.use "AssetHeaders" # ... end