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

Resource interpreted as Stylesheet but transferred with MIME type text/plain #182

Closed
jscastro76 opened this issue Jan 20, 2021 · 1 comment
Assignees
Milestone

Comments

@jscastro76
Copy link
Owner

Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://localhost:8080/examples/css/threebox.css".

It's not a blocker, but definitely is a warning that could be avoided in server.js or with HTML tagging
https://stackoverflow.com/questions/41734976/resource-interpreted-as-stylesheet-but-transferred-with-mime-type-text-javascrip
https://stackoverflow.com/questions/33280981/nodejs-cant-load-css-file

@jscastro76 jscastro76 self-assigned this Jan 20, 2021
@jscastro76 jscastro76 added this to the v.2.1.8. milestone Jan 20, 2021
@jscastro76
Copy link
Owner Author

Server.js is an optional file to use, but as long as it's producing this warning, it's been solved adding a content-type header for all the valid extensions, defined at a list of valid Mime types. In that way any new static file extension will be added to server.js

response.setHeader("Content-Type", validExtensions[ext]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant