且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Node.Js:资源解释为字体,但使用MIME类型text/html传输

更新时间:2022-04-10 21:34:44

这可能意味着您正在请求的资源没有匹配的路由,因此服务器正在向下发送索引页面.如果在浏览器的开发人员工具中查看请求的内容,则应该看到它是一个正在返回的html文档.您需要诊断为什么要请求的内容除了提供index.html页的默认路由之外没有匹配的路由.

It probably means that you are requesting a resource that doesn't have a matching route, so the server is sending down the index page. If you look at the contents of the request in the developer tools of your browser, you should see that it is an html document that is being returned. You need to diagnose why what you are requesting doesn't have a matching route besides the default route that serves up the index.html page.