FortAwesome / Font-Awesome

The iconic SVG, font, and CSS toolkit
https://fontawesome.com
Other
73.53k stars 12.2k forks source link

Access denied (403) for font files at use.fontawesome.com #18069

Open Yoelx opened 3 years ago

Yoelx commented 3 years ago

The bug At some point in the last ~1-2 days, the icons on our websites stopped loading. Browser logs show that the font file URLs are returning 403 Access Denied response codes.

The browser log shows:

GET https://use.fontawesome.com/releases/v5.0.13/webfonts//fa-solid-900.woff2 net::ERR_ABORTED 403 4e9308730725.css:1 GET https://use.fontawesome.com/releases/v5.0.13/webfonts//fa-solid-900.woff net::ERR_ABORTED 403 4e9308730725.css:1 GET https://use.fontawesome.com/releases/v5.0.13/webfonts//fa-solid-900.ttf 403

Alternatively, try using curl to request font URLs manually:

$ curl -Is https://use.fontawesome.com/releases/v5.0.13/webfonts//fa-solid-900.woff2 | head -n 1 # response: HTTP/2 403

Expected behavior The URLs return the files normally with a 200 response code and load the files, as it has worked before this issue.

Version Version: 5.0.13 Browser and version:

Thanks for any help.

tagliala commented 3 years ago

Hi!

Thanks for being part of the Font Awesome Community.

I can notice that there is a double slash causing troubles

>curl -Is https://use.fontawesome.com/releases/v5.0.13/webfonts/fa-solid-900.woff2
HTTP/1.1 200 OK

Could you please provide more information about this issue? How are you loading those font files?

informatikTirol commented 3 years ago

The double slash causing the problem, indeed, thx!

tagliala commented 3 years ago

It is not clear how are you using font awesome. Is it like a hybrid approach with self-hosted custom css and remote font files directly referred from CSS?

Yoelx commented 3 years ago

Hi Tagliala, thank you very much for the quick response. Removing the double slash indeed solved the issue. We are confused why it has worked until this day and not now anymore, but not important, as the issue is solved!

Regarding your questions, the URL (https://use.fontawesome.com/releases/v5.0.13/webfonts/) was used as the $fa-font-path variable in /fontawesome-5/web-fonts-with-css/scss/_variables.scss This is where the trailing slash at the end of the URL was wrongly present.

We are indeed self-hosting custom css (sometimes in combination with Zurb's Foundation) in which the Font Awesome files are then referenced.