0
votes

I have Sonar Qube server running fine with Apache Tomcat, and a reverse proxy with URL Rewrite in IIS. The reverse proxy maps the domain name to the localhost:9000 address for Sonar Qube just fine, but the java script files embedded in the home page do not run. In Chrome's dev tools I get this error (company sensitive names have been made generic in this error output):

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.

I've followed the instructions on this dev blog post to the letter to no avail (it's a 3 part series, part 3 addresses this specific problem): https://blogs.msdn.microsoft.com/friis/2016/08/25/iis-with-url-rewrite-as-a-reverse-proxy-part-3-rewriting-the-outbound-response-contents/

Has anyone come up against this before and solved it?

1

1 Answers

1
votes

It looks like that the setup of your reverse proxy is incorrect because the mimetypes of JavaScript files are incorrect.

Can you remove the configuration of overwriting the mime types ? The one sent by SonarQube should be preserved.