swingmx / swingmusic

Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music.
https://swingmx.com
MIT License
804 stars 44 forks source link

settings api request fails because of https redirect #193

Closed Coding-Kiwi closed 8 months ago

Coding-Kiwi commented 8 months ago

I run swingmusic as docker container behind a nginx proxy manager instance for https

The client makes a request to https://<instance>/settings which results in a redirect to http://<instance>/settings/ notice the extra slash and its now http instead of https

This results in a /#/settings/general:1 Mixed Content: The page at 'https://<instance>/#/settings/general' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://<instance>/settings/'. This request has been blocked; the content must be served over HTTPS. error

the app worked great but then I upgraded to 1.4.8 this failed because of poetry, so I tried out 1.4.7

Is there a way to tell the instance the correct app baseurl or that it is running behind a https proxy?

cwilvx commented 8 months ago

Hello @Coding-Kiwi

Sorry about the v1.4.8 poetry issue, can you confirm whether it's related to issue https://github.com/swing-opensource/swingmusic/issues/191?

I noticed this issue on reverse proxy but I haven't figured out what's the problem. This issue will be investigated.

Thanks for reporting.

Simonh2o commented 8 months ago

Getting the same mixed content warning too, not using docker if that helps, just the binary.

cwilvx commented 8 months ago

Hi guys

I found out that the browser automatically redirects /settings route for some reason. When I change the route to /notsettings it doesn't redirect ...