I have set up an instance of SonarQube Community using Docker and I’m making it available on a publically accessible URL by using an NGINX reverse proxy going through CloudFlare but after initial setup whenever I try to go to the URL I am faced with an infinite loading screen and a JavaScript parsing error in the console. I’ve tried 3 browsers (Vivaldi, Firefox, Safari) both regular tabs and ingonito tabs and in the case of the former 2 also with all “blocking” type extensions disabled.
The error I get is:
Uncaught SyntaxError: Invalid or unexpected token (at outBIMYN2XL.js:1:7186)
My NGINX config is:
upstream sonarqube.sapphirejs {
server 127.0.0.1:9000;
keepalive 8;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name sonarqube.sapphirejs.dev;
access_log /somelog;
ssl_certificate /myfile.pem;
ssl_certificate_key /apath.key;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://sonarqube.sapphirejs/;
proxy_redirect off;
}
}
My Cloudflare is set to “proxy” type for the A DNS record going to https://sonarqube.sapphirejs.dev.
Notably when I access the server through the public IPv4 address directly then it does work fine.
Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): 10.4.1
- how is SonarQube deployed: zip, Docker, Helm: Docker
- what are you trying to achieve: Logging in
- what have you tried so far to achieve this: See above