Font Awesome Failed to load resource /font/fontawesome-webfont.woff?v=3.0.1

font-awesomegrails

Everything looks fine on the site, but those two errors are showing up in the console. If I hit the url the font downloads. Been trying to track this down for a while, but I am getting two errors in the console:

Failed to load resource resource:/font/fontawesome-webfont.woff?v=3.0.1
Failed to load resource resource:/font/fontawesome-webfont.ttf?v=3.0.1

How can I get rid of this error?

enter image description here
enter image description here

Best Answer

I recently encountered and solved this problem. The solution is to add the 'font' directory, and any other directories you want resources to be processed to your adhoc includes, so it ends up looking something like this in config.groovy (add directories as needed if you have resources elsewhere).

grails.resources.adhoc.includes = ['/images/**', '/css/**', '/js/**', '/font/**']

More detail here: URLs within CSS files broken with Grails resources plugin 1.2.7