npm http-server with header X-Content-Type-Options

412 views Asked by At

Used $ http-server --cors . to serve the following that tried to access https://github.com/vuejs/vue/blob/dev/dist/vue.js

<!DOCTYPE html>
<html>
</head>

<body>
   DEMO
</body>

<script src="https://github.com/vuejs/vue/blob/dev/dist/vue.js"></script>

</html>

However it posted the following error:

The resource from “https://github.com/vuejs/vue/blob/dev/dist/vue.js” was blocked
due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

enter image description here

How to fix it or make npm http-server have header X-Content-Type-Options?

0

There are 0 answers