server {
listen 80;
server_name damon.cool www.damon.cool;
rewrite ^(.*)$ https://www.damon.cool:443$1 permanent;
}
server {
#监听443端口
listen 443 ssl;
#对应的域名
server_name damon.cool;
ssl_certificate /etc/ssl/3450756_damon.cool.pem;
ssl_certificate_key /etc/ssl/3450756_damon.cool.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
client_max_body_size 1024m;
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8090/;
}
}
这是nginx的配置
Access to font at 'https://www.damon.cool/anatole/source/fonts/fontawesome-webfont.ttf?v=4.7.0' from origin 'https://damon.cool' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
这是F12,控制台的错误。百度了之后好像是说Nginx的问题,请问大佬这个怎么解决。