I am setting up a local dev environment in which I am proxying certain requests to a back-end server.
When calling the back-end server directly, I get the below browser prompt for a local certificate for authentication.
How can I do the same thing in a reverse_proxy
directive in my Caddyfile (passing the certificate to the back-end)? I have tried tracing the calls in Developer Tools but I don't see how the certificate is included in the request (headers).
I thought I could maybe include a tls
directive inside the route
where I define the proxying to take place, but Caddy complains, saying
tls directive returned something other than an HTTP route or subroute
route /abc/def/* {
tls internal {
client_auth {
trusted_leaf_cert_file "C:\path\to\local.cer"
}
}
uri replace /abc/def /ghi/jkl
reverse_proxy https://back-end.service {
header_up Authorization "Basic xxxxxxxxxxxxxxxxxx"
}
}