DAIRAV
DAIRAV

Reputation: 731

font-awesome loading locally from project getting 415 (Unsupported Media Type)

Configured in the project to load "fontawesome.min.css" from the local project folder instead of from CDN. Followed the below steps and configuration, now getting 415 Unsupported Media type.

  1. Downloaded the font-awesome-4.7.0.zip file from here

  2. Extracted it to the local project

  3. updated the html file to load the "fontawesome.min.css" file from local instead from CDN

  4. After that, now getting 415 (Unsupported Media Type)

.../font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 net::ERR_ABORTED 415 (Unsupported Media Type)

Referrer: .../font-awesome/css/font-awesome.min.css

Original code:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/fontawesome.min.css">
       
Updated code:
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">

The invoking code from

"fontawesome.min.css" is enter image description here

Upvotes: 2

Views: 370

Answers (1)

Parth M. Dave
Parth M. Dave

Reputation: 1163

The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.

web.config:

<system.webServer>
  <staticContent>
    <remove fileExtension=".woff2" />
    <mimeMap fileExtension=".woff2" mimeType="font/woff2" />
  </staticContent>
</system.webServer>

Upvotes: 1

Related Questions