archivy-docker icon indicating copy to clipboard operation
archivy-docker copied to clipboard

Archivy Redirect behind Traefik with HTTPS redirecting to HTTP

Open lennysh opened this issue 4 years ago • 1 comments

So, here's my issue. I have Traefik running elsewhere, and it's configured to use the file backend, instead of the docker backend.

Browsing to https://<domain>/login displays properly, but browsing to https://<domain> redirects me back to http://<domain> (because it's trying to redirect me to /login):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="/login?next=%2F">/login?next=%2F</a>.  If not click the link.

Even when browsing to https://<domain>/login (where the page loads fine, I can't do anything, because when I do, it keeps redirecting me back to HTTP. So every time it goes back to HTTP, I just add an S and I can get that page to load (until I click something else), and the process keeps repeating.

I tried to fix this in Traefik (by redirecting HTTP to HTTPS), but then I get the "Too Many Redirects" message.

I think it would be a great idea to add a URL option in the config so we can add the full domain (https://<domain>) to the config, and the redirect would use it. Or at least be able to tell it to use HTTPS instead of HTTP (HTTPS=true) or something.

Thoughts? I mean, if I missed something that already fixes this issue, please let me know.

lennysh avatar Feb 19 '21 20:02 lennysh

That's a weird issue. I have a working Archivy instance behind Traefik, but I'm using the Docker provider instead of the file provider. Can you give us more information about your configuration?

What labels are you using for the Archivy container? What does your Traefik static config look like?

Jafner avatar Feb 19 '21 23:02 Jafner