badaix / snapcast

Synchronous multiroom audio player
GNU General Public License v3.0
6.21k stars 456 forks source link

Add custom URL prefix for HTTP URLs #1260

Closed rechner closed 4 months ago

rechner commented 4 months ago

Hello :wave:

A small tweak to the way that URLs for album art is generated for the HTTP RPC server. I utilize the Snapweb interface through a reverse proxy with SSL termination, which unfortunately breaks album art images in snapweb due to port mismatch and SSL mixed content policies (e.g.: my snapserver hosted at snapserver.lan on the default port, is available over the WAN via a reverse proxy at https://snapcast.example.com, but setting http.host = snapcast.example.com results in image URLs being http://snapcast.example.com:1780).

I worry this addition might create some confusion in the configuration with the http.host configuration, but allowing a totally custom URL prefix like this provides better flexibility of schema, hostname, and port instead of using a piecemeal-constructed string, does it make sense to keep both around?

Tested on Debian 11.

Thanks,


Pull Request Checklist

badaix commented 4 months ago

Thanks! Merged it into the tls branch, because this must be touched in the TLS branch anyways.