I have my application in my development server, now i am planning to implement CDN for all the assets used in the application.
How can i do this with Rails? is there any available gem for doing this or any manual configuration has to be done?
I tried googling this topic but found suggestions mostly for Cloud front Heroku.
Note : I am using Ngnix in my server and going to buy CDN from a different Vendor.
Found the solution
Steps to implement custom cdn url
1) Set the asset path in
config/environment/production.rb2) Rename all the styles and js files as shown below
(if you miss this step, the asset_path tag mentioned in step 3 will not work)
3) Update the stylesheet code as shown below
Note : But make sure you set Access-Control-Allow-Origin “* or cdn url” in NGINX.
Only then you can access your font family from cdn url as Firefox and IE doesn’t allow this by default.