X-Content-Type-Options:nosniff in DWR

Setting X-Content-Type-Options:nosniff in response header is not allowing the DWR calls to execute. Getting text/plain MIME type mismatch. Is there a solution for this?



I had the same problem activating X-Content-Type-Options: nosniff in the IHS server. I got crazy trying to solve it but the only thing that I found to avoid this error is doing a work-around.

  1. Deactivate X-Content-Type-Options: nosniff in the server.
  2. Enter in the web to the application and copy all the dwr files that generate the pluging.
  3. Copy this files to the phisic route of js and change the path to invoke it.
  4. Comment the generate of this js files in dwr.xml.
  5. Deploy it, activate the rule in the server and test it.

UPDATE: The DWR is an open source lib, you can modify it. The problem is in the lib because all the js that serve in the interface folder and in the plainjs folder, it set the content type to text/plain. Modify it and it will solve the problem.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.