将我的电子邮件地址放入https://cdn.fontawesome.com/后,我已经使用了他们在下面成功寄给我的脚本几周:
<script
src="https://use.fontawesome.com/f77107.js"
integrity="sha384-I95sGQCWfGLJRrRjoLq3cZ/yPbdj"
crossorigin="anonymous">
</script>
但过去几天我现在收到错误:
Script from origin 'https://use.fontawesome.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://0.0.0.0:8080' is therefore not allowed access.
如何解决此问题?
** 更新 **
以下是Chrome中针对该脚本的网络请求:
Request URL:https://use.fontawesome.com/f7710.js
Request Method:GET
Status Code:200
Remote Address:198.232.124.196:443
Response Headers
content-encoding:gzip
content-type:text/javascript
date:Fri, 16 Sep 2016 08:31:11 GMT
etag:W/"67515ed3d4b367595d2bffec7957e091"
last-modified:Thu, 18 Aug 2016 14:42:58 GMT
server:NetDNA-cache/2.2
status:200
x-amz-id-2:NyXyLH0T3oam8vXdxwaWXnVO6z2zI7sAnwh3Z+hmkgfbUc5x8dGsJOAajOZvkLCZC6FbnHcAWtU=
x-amz-request-id:C5CAA9C95369D6C0
x-cache:HIT
Request Headers
:authority:use.fontawesome.com
:method:GET
:path:/f7710.js
:scheme:https
accept:*/*
accept-encoding:gzip, deflate, sdch, br
accept-language:en-GB,en-US;q=0.8,en;q=0.6
cache-control:no-cache
origin:http://0.0.0.0:8080
pragma:no-cache
referer:http://0.0.0.0:8080/login?redirect=%2Fprofile
user-agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36