mardi 5 mai 2015

Using rack-cors with Rackspace CDN issues

I have a rails 4.2 app using rack-cors. None of my font-awesome icons show up even though all my other assets are fine. I'm using the rackspace cdn. My CDN url looks something like

http://ift.tt/1GYkfDb

My rack-cors config is in my config/application.rb

config.middleware.insert_before 0, "Rack::Cors" do
  allow do
    origins 'localhost:3000', /^http:\/\/\w+.+rackcdn.com/
    resource '/assets/*', headers: :any, methods: :get
  end
end

The icons show up locally just fine. It's only in production that they don't show. Any ideas on what I might be missing?

Aucun commentaire:

Enregistrer un commentaire