【发布时间】:2018-05-29 20:42:04
【问题描述】:
我的 Sonar Qube 服务器在 Apache Tomcat 上运行良好,在 IIS 中使用 URL Rewrite 的反向代理。反向代理将域名映射到 Sonar Qube 的 localhost:9000 地址就好了,但是主页中嵌入的 java 脚本文件不运行。在 Chrome 的开发工具中,我收到此错误(在此错误输出中已将公司敏感名称设为通用名称):
Refused to execute script from 'http://sonarqube.company.us/sonar/js/vendor.foo.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Refused to execute script from 'http://sonarqube.company.us/sonar/js/app.bar.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
我已按照此开发博客文章中的说明进行操作,但无济于事(这是一个 3 部分系列,第 3 部分解决了这个特定问题):https://blogs.msdn.microsoft.com/friis/2016/08/25/iis-with-url-rewrite-as-a-reverse-proxy-part-3-rewriting-the-outbound-response-contents/
以前有没有人遇到过这个问题并解决了?
【问题讨论】:
标签: iis sonarqube reverse-proxy url-rewrite-module