[Play 1.x] webfonts CORs CDN issue

54 views
Skip to first unread message

alotatakada

unread,
Feb 15, 2016, 8:13:22 PM2/15/16
to play-framework

I am trying to serve webfonts to my website using a CDN (MaxCDN) but am getting the following browser error. Website is hosted on Heroku using Play Framework 1.2.7.2:

Font from origin 'https://______.netdna-ssl.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://______.herokuapp.com' is therefore not allowed access.

MaxCDN pointed me to this article but is only relevant for Apache server. Any suggestions on how to fix this for Play Framework 1.2.7.2.

https://www.maxcdn.com/one/tutorial/how-to-use-cdn-with-webfonts/

I can find an article explaining how to resolve the issue for Play 2.x here (https://www.playframework.com/documentation/2.4.x/CorsFilter) but not for Play 1.x.



Corresponding StackOverflow - http://stackoverflow.com/questions/35420446/play-framework-1-x-webfonts-cors-issue

alotatakada

unread,
Feb 16, 2016, 6:53:47 PM2/16/16
to play-framework
bump.
Reply all
Reply to author
Forward
0 new messages