[英]X-Content-Type-Options:nosniff in DWR
Setting X-Content-Type-Options:nosniff in response header is not allowing the DWR calls to execute.在响应头中设置 X-Content-Type-Options:nosniff 不允许执行 DWR 调用。 Getting text/plain MIME type mismatch.
获取文本/纯 MIME 类型不匹配。 Is there a solution for this?
有解决方案吗?
I had the same problem activating X-Content-Type-Options: nosniff in the IHS server.我在 IHS 服务器中激活 X-Content-Type-Options: nosniff 时遇到了同样的问题。 I got crazy trying to solve it but the only thing that I found to avoid this error is doing a work-around.
我疯狂地试图解决它,但我发现避免此错误的唯一方法是进行变通。
UPDATE: The DWR is an open source lib, you can modify it.更新:DWR 是一个开源库,您可以对其进行修改。 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.
问题出在 lib 中,因为在 interface 文件夹和 plainjs 文件夹中提供的所有 js 都将内容类型设置为 text/plain。 Modify it and it will solve the problem.
修改它,它将解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.