Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)

后端 未结 14 1002
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 11:53

I am developing a web page using JavaScript and HTML, everything was working good when I have received this list of errors from my HTML page:



        
14条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 12:21

    This can be fixed by changing your URL, example bad:

    https://raw.githubusercontent.com/svnpenn/bm/master/yt-dl/yt-dl.js
    Content-Type: text/plain; charset=utf-8
    

    Example good:

    https://cdn.rawgit.com/svnpenn/bm/master/yt-dl/yt-dl.js
    content-type: application/javascript;charset=utf-8
    

    rawgit.com is a caching proxy service for github. You can also go there and interactively derive a corresponding URL for your original raw.githubusercontent.com URL. See its FAQ

提交回复
热议问题