-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🤔 app.Static serving JS as text/plain #352
Comments
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 |
@fhammoud, what OS are you running on and do the javascript files have the |
@thomasvvugt Helped me with this. The issue was wrong |
Issue is open on Go itself as well. |
Question description
I'm not sure if this is a bug or if I'm doing this wrong, but I created an Angular 9 app to be served by my Fiber app. The Angular app compiles the output to /public. When I add the app.Static middleware I can see that all my angular files have been sent but the JS files have the mime-type text/plain instead of application/javascript, and so the browser is throwing an error: "Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec."
Code snippet (optional)
The text was updated successfully, but these errors were encountered: