font awesome loading problem

473 views
Skip to first unread message

Soumen Khatua

unread,
Apr 9, 2020, 2:27:16 AM4/9/20
to django...@googlegroups.com
Hi Folks,

I'm using AWS S3 bucket for my django project,now I want to serve all the sattic files using this s3 bucket. So I copied all the all static file from CDN and websites to my S3 bucket.All are working fine for font-awesome I'm getting some error like:

Access to font at 'https://xyz.s3.amazonaws.com/static/css/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.  

I spent  almost 1day to solve this probem and still I don't now How to solve it??
Please help me guys regarding this issue.

Thank you in advance

Regards,
Soumen

Note: All error are here

Access to font at 'https://xyz.s3.amazonaws.com/static/css/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.



Access to font at 'https://xyz.s3.amazonaws.com/static/css/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.




Roger Gammans

unread,
Apr 9, 2020, 3:17:14 AM4/9/20
to django...@googlegroups.com
Hi,

that looks like it's your s3 bucket setup. s3 is not supporting the CORS (cross-origin -request-security) check requests the browser is making.

I googled "s3 bucket cors" and found this which looks like in contains the answers you are looking for.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WaCrSjdH7%2B0Ng1Wh_s5%2BAxH-7ike1Y9ntcwzUfQYqoOGw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages