Open samcro1967 opened 5 years ago
You might want to try with some forward headers :
Here is what I found, not sure how cddy works, but you could try it (you need to replace host with something, not sure if you can get the host dynamically).
header_upstream X-Forwarded-Proto https
header_upstream X-Forwarded-Host <host>
Would you mind sharing your configuration once you have a working setup ? Even bettre would be to open a PR on the airsonic-docs repo with your configuration !
The transparent command for Caddy does all of that already if I am understanding the documentation correctly:
transparent - Passes thru host information from the original request as most backend apps would expect. Shorthand for:
header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream X-Forwarded-For {remote} header_upstream X-Forwarded-Port {server_port} header_upstream X-Forwarded-Proto {scheme}
Found some documentation I missed in the inital setup. This solved the issue.
You will also need to make sure Tomcat uses the correct headers for redirects. Stop your Airsonic server or docker image and:
nano /path/to/airsonic/config/airsonic.properties Add the following line to the bottom of the file:
server.use-forward-headers=true
Looks like this issue was accidentally reopened.
I am running airsonic in a Docker container with URL base set as airsonic.
CADDYFILE
https://mydomain.net gets redirected to http//mydomain.net after I provide valid user name and password. Seems like Airsoni is redirecting HTTPS traffic to HTTP which is not configured in Caddy or allwed through the firewall.
Hoping I am missing something simple.
Airsonic log file airsonic.log