Haproxy reverse proxy with short names

Hi all, thanks to the great video, I have a nice setup working perfectly with a wildcard cert from letsencrypt. I do not expose any services externally, all are inside the network only.

Question is, can I have a rewrite rule or something add in my domain name for me, so that I can use short names from my devices?

DNS is working fine with short names, but TLS breaks when my short name isn’t in the subject or SAN.

I’d like to open a browser and do: https://code, and then have HAproxy send to the backend as code.mydomain.com so TLS just works as is.

I’m sure I’m missing something well documented, and very simple, but I did try to get it working, and I fail in different ways every time.

Thanks!

Not something that I have tested but in theory it should work if you have a DNS and matching HAProxy entry that has a matching certificate. But the cert will have to be installed on the system that you are coming from as normal ACME certs require a proper domain.