1
votes

I'm attempting to load Google Fonts and an image over HTTPS, but they keep loading over HTTP, despite changing the path to "https" in all of the assets.

Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300italic,300,400italic,500,500italic,700,700italic,900,900italic'. This request has been blocked; the content must be served over HTTPS.

Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure image 'http://farm6.staticflickr.com/5267/5783999789_9d06e5d7df_b.jpg'. This content should also be served over HTTPS.

2

2 Answers

2
votes

You can use protocol related url like this:

'//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300italic,300,400italic,500,500italic,700,700italic,900,900italic'. 

Also, do not forget to run

  rake assets:precompile

before pushing to heroku.

1
votes

For people who are facing similar troubles using laravel {{HTML::style('css/style.css')}} and {{HTML::script('js/script.js')}} can simply make the HTMLBuilder secure by modifying the statements to

{{HTML::style('css/style.css',array(),true)}} and

{{HTML::script('js/script.js',array(),true)}}

where 'true' insists that the content are severed secure or over HTTPS