small medium large xlarge

26 Jun 2017, 17:40

Getting Everything Out of Bootstrap On Chapter 13, when trying to use glyphicon, it only shows square box in chrome. below is error on console.

Access to Font at ‘http://localhost:8080/packs/glyphicons-halflings-regular.ttf’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:3000’ is therefore not allowed access.

When I try with Safari, Icon are displayed properly.

Is it something we need to setup in Rails Configuration?

Chrome version => Version 58.0.3029.110 (64-bit)

Does anyone face the same issues and please guide if anyone has a solutions.


27 Jun 2017, 11:28
David Copeland (511 posts)

I am on this exact version and this doesn’t happen for me—the fonts all work.

Are you doing anything else unusual? Since Webpacker is serving up the fonts, the dev server is what could be generating a CORS issue, but it should not happen when both are on localhost.

You must be logged in to comment