mudsharkymon wrote:Still unresolved. Is this board still used by people? Is anyone there?
This happens because Subsonic is serving a mix of HTTPS and HTTP content, which modern browsers block. I now run my setup on Linux using nginx. Many modern firewalls can proxy Subsonic and handle this translation to ensure all content is HTTPS when proxied.
Here are the nginx settings that make this work. The key is this command:
add_header Content-Security-Policy "upgrade-insecure-requests";
This command takes any HTTP content returned by Subsonic and upgrades it to HTTPS before sending it back to the browser.
- Code: Select all
location / {
proxy_pass http://127.0.0.1:4040;
# Existing headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Crucial additions for Subsonic settings
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
# Tell Nginx to inject a Content Security Policy (CSP) header
add_header Content-Security-Policy "upgrade-insecure-requests";
# Prevents Subsonic from dropping connections early
proxy_read_timeout 90s;
}