Score:0

Using Traefik, how to expose inner HTTPS errors (like expired certs)?

cn flag

I'm using Traefik as a reverse proxy to my homelab. I'd like to use HTTPS inside the lab using a custom CA. To do this, I've set up a ServersTransport that trusts my lab CA.

This worked well until a few days ago when a critical service's certificate expired. At that time, Traefik returned a page saying "Internal Server Error" and nothing else, and I had to log in to the proxy server to discover that it was indeed a certificate expiring that caused it.

Is there a way to configure Traefik so that, when there is a TLS error, it would show what the error is? I can't use an Errors middleware because the inner services might return 500 errors as well, and I can't afford to lose access to the bodies of those responses like Errors would.

(I would accept having to switch to a different reverse proxy if it turns out that Traefik can't easily do it. It doesn't seem like many others can do anything like this.)

Ginnungagap avatar
gu flag
Would using the [Traefik dashboard](https://doc.traefik.io/traefik/operations/dashboard/) be a viable solution?
Danya02 avatar
cn flag
@Ginnungagap How does that help? I tried to add a router with a service pointing at https://expired.badssl.com/, and that showed up with a status of "OK" on both. Maybe some kind of metrics needs to be enabled for such errors to show up?
Ginnungagap avatar
gu flag
You need an associated healthcheck for the service to be marked down.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.