I am about to setup a cdn for my website using amazon cloud front.
It works nicely with pictures, but will throw errors on font and js files. The rules are set up exactly the same, I don't know why I am getting this error:
Font from origin 'foo' has been blocked from loading by Cross-Origin
Resource Sharing policy. No 'Access-Control-Allow-Origin' header is
present on the requested resource. Origin 'bar' is therefore not
allowed access. The response had HTTP status code 502.
I read about the Access-Control-Allow-Origin header and added it to .htaccess like this but to no avail:
Header add Access-Control-Allow-Origin "*"
(Also tried with Domain name, no difference.
Any hint is highly appreciated.
Aucun commentaire:
Enregistrer un commentaire