-
Notifications
You must be signed in to change notification settings - Fork 865
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
Refused to apply style because its MIME type ('application/json') is not a supported stylesheet MIME type, and strict MIME checking is enabled. #580
Comments
Don't think this issue is caused by http-proxy-middleware. You might find your answer this thread: froala/angular-froala#170 (comment) Adding |
@chimurai thanks for the quick reply. The reason I opened this issue against http-proxy-middleware is because I did not experience this issue against I saw the commit and you are checking that a content-type is present and then comparing it to I have already looked at this thread: froala/angular-froala#170 (comment). However, the issue that I face is that I don't have access to webpack config because I am using CRA (create-react-app) and that uses react-scripts that abstracts away any webpack config that I have. So I was wondering if there is a setting I can apply at the proxy-middleware layer that will allow me to get past this issue. |
The commit you saw for Which is used like this. const { createProxyMiddleware, fixRequestBody } = require('http-proxy-middleware');
const proxy = createProxyMiddleware({
/**
* Fix bodyParser
**/
onProxyReq: fixRequestBody,
}); It's basically dead code in your setup, since http-proxy-middleware is used in webpack-dev-server / prereact for its proxy functionality. Think your question should be asked in either prereact or webpack-dev-server. To get better help, providing a minimal reproducible example would really help; Without one it's really difficult to investigate. |
Might be related to this maybe? webpack/webpack-dev-server#3168 (comment) |
Closing issue. Feel free reopen when a working reproducible example can be provided. |
npm ls http-proxy-middleware
Please verify that you've followed these steps
[x] - I've updated to latest
http-proxy-middleware
.Describe the bug
I am using a combination of create-react-app + http-proxy-middleware for my application.
I am seeing the following issue
I was not seeing this issue with
[email protected]
. So I am not sure how to go about fixing this.To Reproduce
Step-by-step reproduction instructions
Expected behavior
It should load the stylesheet from the main chunk and application should appear with the correct styles loaded.
http-proxy-middleware
configurationServer (please complete the following information):
The text was updated successfully, but these errors were encountered: