vendredi 7 août 2015

How do I know my heroku app is actually grabbing assets from cloudfront AWS?

I setup CloudFront AWS to host my static assets for my Heroku App by following this article:

http://ift.tt/1w7Izd6

I setup the CDN url on AWS and added to my config/environments/staging.rb file:

config.action_controller.asset_host = "xxxx.cloudfront.net"

I deployed to my staging environment and find that my page loads are slower. I do inspect element on chrome and it all seems fine (the assets are coming from cloudfront). However, when I look at my Heroku Logs, I see the following:

    2015-08-08T00:40:52.667517+00:00 heroku[router]: at=info method=GET path="/assets/ajaxSpinner.gif" 
    host=xxxx.herokuapp.com request_id=326eaf7b-erf5-wr5a-954b-86fwefwwf fwd="xx.xxx.xxx.193" 
dyno=web.1 connect=0ms service=31ms status=200 bytes=19488

Shouldn't the "path" be something like: "http://ift.tt/1J1UMNF"???




Aucun commentaire:

Enregistrer un commentaire