[英]Webfaction Access to font at domain/fonts/fontname.ext from origin 'http://mydomain' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'
I have django 2.1.5 with python3.7 app worket well on local... 我在本地上很好地使用Django3.7和Django3.7应用程式工作套件2.1.5 ...
I have create static app in my webfaction dashboard Static-Only (no .htaccess). 我在Webfaction仪表板“仅静态”(没有.htaccess)中创建了静态应用。 All work fine except certains fonts i have this message this error in my browser: 除某些字体外,其他所有工具都工作正常,我在浏览器中收到此错误消息:
Access to font at 在访问字体
' http://domain/static/plugins/elegant_font/html_css/fonts/ElegantIcons.woff ' from origin ' http://domain ' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 来源' http:// domain '的' http://domain/static/plugins/elegant_font/html_css/fonts/ElegantIcons.woff '被CORS策略阻止:不存在'Access-Control-Allow-Origin'标头在请求的资源上。 (index):942 GET http://domain/static/plugins/elegant_font/html_css/fonts/ElegantIcons.woff net::ERR_FAILED** (索引):942 GET http://domain/static/plugins/elegant_font/html_css/fonts/ElegantIcons.woff net :: ERR_FAILED **
How can i solved it i have trying many solution (django-cors-headers and others) But not work. 我该如何解决呢?我尝试了许多解决方案(django-cors-headers等),但没有用。 I need if possible step by step help ... 我需要逐步帮助...
I hope you solved your issue by now. 希望您现在解决了您的问题。
From my experience just make sure the webfaction static app is in the same website/domain group as your webfaction django/mod_wsgi app (like the screenshot below): 根据我的经验,请确保webfaction静态应用程序与webfaction django / mod_wsgi应用程序位于同一网站/域组中(如以下屏幕截图所示):
I followed the following instructions from the Webfaction Documentation . 我遵循了Webfaction文档中的以下指示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.