Google Chrome gives warning Resource interpreted as Font but transferred with MIME type application/octet-stream:

前端 未结 3 1259
刺人心
刺人心 2021-02-04 04:46

I keep getting this warning

Resource interpreted as Font but transferred with MIME type application/octet-stream: \"http://127.0.0.1:8080/assets/font/fontawesome-webfont

3条回答
  •  无人共我
    2021-02-04 04:48

    If you're using a Rack-based app, you can amend the Rack::Mime::MIME_TYPES hash in your config.ru:

    # Additional mime types
    Rack::Mime::MIME_TYPES.merge!({
      ".eot" => "application/vnd.ms-fontobject",
      ".ttf" => "font/ttf",
      ".otf" => "font/otf",
      ".woff" => "application/x-font-woff"
    })
    

提交回复
热议问题