-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No 'Access-Control-Allow-Origin' header is present on the requested resource. when accessing from localhost #6987
Comments
Same problem here. I am using:
and the icons show a square box. The console logs:
I am developing on Localhost. |
@ianlintw @gilbertoalbino By any chance do you guys have Location Override turned on? I turned it off and things started to work. |
@niazangels thanks! |
Hi,
I am just starting to try out Semantic UI in my react project on a localhost machine. I add a CDN link of semantic.min.css as , but my browser complains that when it is trying to fetch icons.woff, icons.woff2, and icons.ttf it is blocked by CORS policy. It looks like the server hosting the resource needs to send out 'Access-Control-Allow-Origin' header, based on what I see in the browser console. Thoughts? Thanks in advance!
Best,
Ian
Here are the full error message:
Access to font at 'https://fonts.gstatic.com/s/lato/v16/S6uyw4BMUTPHjx4wXiWtFCc.woff2' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field accept-language is not allowed by Access-Control-Allow-Headers in preflight response.
localhost/:1 GET https://fonts.gstatic.com/s/lato/v16/S6uyw4BMUTPHjx4wXiWtFCc.woff2 net::ERR_FAILED
localhost/:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.woff2' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
localhost/:1 GET https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.woff2 net::ERR_FAILED
localhost/:1 Access to font at 'https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field accept-language is not allowed by Access-Control-Allow-Headers in preflight response.
localhost/:1 GET https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2 net::ERR_FAILED
localhost/:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.woff' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
localhost/:1 GET https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.woff net::ERR_FAILED
localhost/:1 Access to font at 'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.ttf' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
localhost/:1 GET https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/themes/default/assets/fonts/icons.ttf net::ERR_FAILED
The text was updated successfully, but these errors were encountered: