Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keeps redirecting to HTTP when behind HTTPS proxy #37

Open
karbowiak opened this issue Nov 13, 2021 · 8 comments
Open

Keeps redirecting to HTTP when behind HTTPS proxy #37

karbowiak opened this issue Nov 13, 2021 · 8 comments

Comments

@karbowiak
Copy link

karbowiak commented Nov 13, 2021

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

@XDGFX
Copy link
Owner

XDGFX commented Nov 25, 2021

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.

@karbowiak
Copy link
Author

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

@nrrogers
Copy link

nrrogers commented Jan 7, 2022

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?

@karbowiak
Copy link
Author

@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

@nrrogers
Copy link

nrrogers commented Jan 7, 2022

@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!

@delize
Copy link

delize commented Mar 9, 2022

@karbowiak

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

@karbowiak
Copy link
Author

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

@delize
Copy link

delize commented May 11, 2022

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. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants