Stylesheet not parsed because non CSS MIME types are not allowed in strict mode
Note that you'll get that error if the page doesn't exist and your server is set to fallback or show some error page for non-existent pages.
Stylesheet not loaded because of MIME type
The issue, I think, was with a CSS library starting with comments.
While in development, I do not minify files and I don't remove comments. This meant that the stylesheet started with some comments, causing it to be seen as something different from CSS.
Removing the library and putting it into a vendor file (which is ALWAYS minified without comments) solved the issue.
Again, I'm not 100% sure this is a fix, but it's still a win for me as it works as expected now.
css files are not loaded because strict MIME checking is enabled when using spring security5
I found the solution, I had filter who was changing all files to "text/html"
public class CharacterSetFilter implements Filter {
public void destroy() {}
public void doFilter(
ServletRequest request,
ServletResponse response,
FilterChain next) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");//this line was the problem
response.setCharacterEncoding("UTF-8");
next.doFilter(request, response);
}
// ...
}
Related Topics
Why Does My Flexbox Sticky Footer Not Work in Safari
CSS How to Properly Use Ems Instead of Pixels
How Do Make Ionic 4 Ion-Col The Same Height
Nested Rows in Bootstrap 3 Fail to Respect The Grid
CSS Text Replace with Image, Need Hyperlink
Do I Still Need to Include Type="Value" in HTML5
Incompatible Units: 'Rem' and 'Px' with Bootstrap 4 Alpha 6
Keeping Top Level Menu in Hover State When Moving Down to Sub Menus
Div Gets Misplaced on Text Insertion and Text Goes Out of Div
Bootstrap Scrollspy Link Active Not Applied
How to Avoid Content of Span Break in Two Lines
Putting Buttons and Links Over Particles.Js Script (Z-Index)
CSS Specificity - External Style Sheet Vs Internal Style Sheet Using Just Classes
5Px Extra Margin Getting Added to The Bottom of Each Div
Br Line-Height in Safari and Chrome Leaving Gap
Calculating Background-Position with a Formula in Less CSS
Hide-Nav-Bar Hides Nav-Buttons Too. I Want to Retain The View Title and The Ion-Nav-Buttons