In Internet Explorer, the requested url is being blocked due to mime type mismatch. The scenario is that request is being sent from the client to the destination server through proxy server. Suppose we have A(Client), B(Proxy Server), C(Destination Server). The request goes from A(client) to B(Proxy server) and from B(Proxy server) to C(Destination server). Similarly the response also comes from C(Destination Server) to B(proxy server) and from B(proxy server) to A(client) from where the request was initiated. Now the problem is that the response Content-type is "application/liquid" but the client fires the request using the "script src=proxyserver/test" , so the excepted Content-Type for response becomes "text/javascript". It is not allowed to change the Content-type of response from "application/liquid" of the destination server. The whole scenario works perfectly in all the other browser and the response is easily accessible. However in IE as we are getting the error as "request blocked due to mime type mismatch " . So can anyone provide the solution that how could we make it work ? Below is the screenshot of the error.
In the Connections pane, go to the site, application, or directory for which you want to add a MIME type. In the Home pane, double-click MIME Types. In the MIME Types pane, click Add... in the Actions pane. In the Add MIME Type dialog box, add the file name extension and MIME type, and then click OK.
TL;DR - you will need to change the mime types.
This problem appears when the requests expected type is different from the response-content type (as indicated by the headers). The correct solution would be to make response and request headers compatible with each other. That means, the call you make "through a script tag" should be changed to have the same accept
header as the response's content-type
header.
Also, take a look at the documentation:
nosniff Blocks a request if the requested type is "style" and the MIME type is not "text/css", or "script" and the MIME type is not a JavaScript MIME type.
See here.
I see that this URL: https://nirma.myshopify.com/apps/GeoShippingBar/geoShippingBarProxy has this content-type: Content-Type:text/html; charset=utf-8
which is not javascript-mime-type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With