跨源资源共享政策[nginx]

时间:2015-03-20 05:59:42

标签: grails nginx cors

我使用static.domainname.tv来加载我的所有静态资源。所有静态资源都正常加载,除了我的字体,我在浏览器控制台上收到错误消息

Font from origin 'http://static.domainname.tv' 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://uat.domainname.tv' is therefore not allowed access.

我已经为URl配置了nginx。

http://static.domainname.tv VirutalHost上,我添加了以下位置块以添加标题

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

我仍然收到错误消息。

我正在使用grails进行后端应用

0 个答案:

没有答案
相关问题