Caddy needs a services which tells caddy whether to or not to allow it generate on demand cert for a domain.
References:
Syntax for routing all sevices to same IP
*.domain.name {
tls {
on_demand
}
reverse_proxy ip:port
}
Tested for K8S. Code to be structured and pushed. Requires a service which authorizes on demand tls requests with 200 OK. Designed service using FastAPI.