wrong content type for mjs
lexdene opened this issue · comments
Elephant Liu commented
I got an error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.
I think it is caused by the wrong content type of mjs by cdn.staticfile.org:
$ curl -i https://cdn.staticfile.org/element-plus/2.4.3/index.full.mjs 2>/dev/null | grep -i content-type
content-type: application/octet-stream
A simple way to reproduce this error:
<!DOCTYPE html>
<html>
<body>
<script type="module" src="https://cdn.staticfile.org/element-plus/2.4.3/index.full.mjs"></script>
</body>
</html>
Boon commented
issue fixed:
https://cdn.staticfile.org/element-plus/2.4.3/index.full.mjs
sorry for inconvenient
Elephant Liu commented
this error happens again.
$ curl -i https://cdn.staticfile.org/element-plus/2.4.3/index.full.mjs 2>/dev/null | grep -i ^content-type
content-type: application/octet-stream
also after I use staticfile.net:
$ curl -i https://cdn.staticfile.net/element-plus/2.4.3/index.full.mjs 2>/dev/null | grep -i ^content-type
content-type: application/octet-stream
Boon commented