Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛Expected a JavaScript module script but the server responded with a MIME type of "text/plain" #1763

Closed
34205037 opened this issue Feb 10, 2022 · 1 comment

Comments

@34205037
Copy link

34205037 commented Feb 10, 2022

Fiber version
v2.26.0
Windows version
Windows 10 21H2(19044.1526)

Issue description
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

mime: incorrect mime-type for .js files on windows 10 (text/plain instead of application/javascript) #32350
The requirement of the mime package should be to correctly ascertain the mime type of common files, regardless of Windows registry settings.
The terrible thing is that two years later, this problem still exists.

app.Static serving JS as text/plain #352
We should not ask users to modify the registry.

For a novice in golang , how should I fix it?
sorry,my english is not good.

@welcome
Copy link

welcome bot commented Feb 10, 2022

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@34205037 34205037 changed the title Expected a JavaScript module script but the server responded with a MIME type of "text/plain"🐛 🐛Expected a JavaScript module script but the server responded with a MIME type of "text/plain" Feb 10, 2022
hiifong added a commit to hiifong/Mojito-UI that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant