mchung / heroku-buildpack-wordpress

Heroku buildpack: Wordpress on Heroku
mchung.github.com/heroku-buildpack-wordpress/
388 stars 333 forks source link

No Access-Control-Allow-Origin Error #83

Open vmetayer opened 10 years ago

vmetayer commented 10 years ago

I receive this error when loading external scripts. js and css. I tried adding the access control to my headers but still no luck XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=3.9.2. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://myapp.herokuapp.com' is therefore not allowed access.

okko commented 10 years ago

Browser refused to load the content because Google's server does not give out that header. This has nothing to do with the buildpack.

iposton commented 9 years ago

This 1 year late, but I was having this problem with my wordpress-heroku app as well and it seems adding this line to the .htaccess file fixed it.

Header add Access-Control-Allow-Origin "*"

reference link http://webmasters.stackexchange.com/questions/71630/font-blocked-from-loading-by-cross-origin-resource-sharing-policy-no-access-co