We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Markdown editor not showing font

The markdown buttons above this editor aren't displaying the icomoon font. Taking a look in the developer console this is because CORS isn't enabled, can this be fixed?

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdn.phosphorum.com/fonts/icomoon.woff. This can be fixed by moving the resource to the same domain or enabling CORS. icomoon.woff downloadable font: download failed (font-family: "icomoon" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: https://cdn.phosphorum.com/fonts/icomoon.woff A.theme.css,,qv==2.0.3+editor.css,,qv==2.0.3+diff.css,,qv==2.0.3+style.css,,qv==2.0.3,Mcc.kfn1ZG5tNf.css.pagespeed.cf.hMLZnyUHvL.css Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdn.phosphorum.com/fonts/icomoon.ttf. This can be fixed by moving the resource to the same domain or enabling CORS. icomoon.ttf downloadable font: download failed (font-family: "icomoon" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: https://cdn.phosphorum.com/fonts/icomoon.ttf A.theme.css,,qv==2



98.9k
Accepted
answer
edited Aug '14

Thanks for pointing this out, I added a header to these files in nginx:

location ~* \.(eot|ttf|woff)$ {
    add_header Access-Control-Allow-Origin *;
}

Waiting for CloudFront to refresh the file

This has already been posted as a bug. (https://github.com/phalcon/forum/issues/26) I'm not sure why it hasn't been fixed yet. CORS is only one of the solutions - hosting the font from forum.phalcon.io would also work.