ultrasonics icon indicating copy to clipboard operation
ultrasonics copied to clipboard

Keeps redirecting to HTTP when behind HTTPS proxy

Open karbowiak opened this issue 2 years ago • 8 comments

Hello there, i recently setup ultrasonics to synchronize Spotify and Plex, but i'm putting it behind a Traefik 2 proxy that does HTTPS, but eeeeeevery single time i take any action in ultrasonics, i get redirected to the http version of it.

I could setup http->https redirecting, but that just seems redundant, considering no other application does this kind of forced http redirecting.

Any chance of handling this in Ultrasonics, or am i forced to handle it in Traefik? :P

karbowiak avatar Nov 13 '21 21:11 karbowiak

Hmm, I'm not too sure why that is. I assume the issue is happening when I use

return redirect(request.path, code=302)

But this seems to be the recommend way to redirect when searching online. It looks like I could force a redirect to https but then we get the same issue in reverse.

How have you set up your Traefik 2 proxy? I have one set up that does redirect the user to the https:// url, but all ssl is between the user and Traefik - once inside my home network (between Traefik and ultrasonics, sonarr, radarr etc) it's all plain http.

XDGFX avatar Nov 25 '21 15:11 XDGFX

Yeah my Traefik us setup so everything between the browser and Traefik is https, only between Traefik and the Ultrasonics container is it http.

My guess is that i'm not passing along the right header, i ended up fixing it by forcing all http to get redirected to https - fixed the issue, and also solved a few issues i had with some other things, lol

If anyone needs the setup in the future - just ping me, i should have a backup of the config even a few years from this post :P

karbowiak avatar Dec 01 '21 21:12 karbowiak

Hello there, i recently setup ultrasonics to synchronize Spotify and Apple Music, but i'm putting it behind a Traefik 2 proxy that does HTTPS, but eeeeeevery single time i take any action in ultrasonics, i get redirected to the http version of it.

Apologies for hijacking this, but @karbowiak mentioned syncing Spotify and Apple Music. I'm not seeing an official Apple Music plug-in. Is there a third party plug-in that is available somewhere?

nrrogers avatar Jan 07 '22 15:01 nrrogers

@nrrogers i think it's a case of "writing one thing while reading another and writing that" 😂

Totally ment Spotify and Plex - at this point i got no clue why i wrote Apple Music

karbowiak avatar Jan 07 '22 16:01 karbowiak

@karbowiak No worries, I was just excited that there might be something out there I'm missing. I'll keep my fingers crossed for a potential Apple Music plug-in from someone with more skills than me!

nrrogers avatar Jan 07 '22 16:01 nrrogers

@karbowiak

In the end, did you just set up a HTTP > HTTPS redirect?

delize avatar Mar 09 '22 19:03 delize

@delize yep, i setup a redirect from http to https using traefik2 :)

karbowiak avatar Mar 14 '22 09:03 karbowiak

Hm, this is not working for me.

Are you doing this from a subfolder / URL base, or from domain.org?

Otherwise, maybe this does not work with LinuxServer's swag in some way. 🤔

delize avatar May 11 '22 21:05 delize