This issue talks about this. And this one, too.
So it should work as we are expecting :-/
Here is a request from the Caddy log for curl --resolve dev3.edkimo.com:443:127.0.0.1 https://dev3.edkimo.com/api
2021/03/10 02:14:58.683 DEBUG http.handlers.reverse_proxy upstream roundtrip {"upstream": "10.0.1.2:29194", "request": {"remote_addr": "127.0.0.1:56590", "proto": "HTTP/2.0", "method": "GET", "host": "dev3.foo.com", "uri": "/", "headers": {"User-Agent": ["curl/7.64.0"], "Accept": ["*/*"], "X-Forwarded-For": ["127.0.0.1"], "X-Forwarded-Proto": ["https"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "dev3.foo.com"}}, "duration": 0.002078413, "headers": {"X-Xss-Protection": ["1; mode=block"], "X-Download-Options": ["noopen"], "Cache-Control": ["no-cache"], "Accept-Ranges": ["bytes"], "Keep-Alive": ["timeout=5"], "Strict-Transport-Security": ["max-age=15768000"], "X-Frame-Options": ["DENY"], "Content-Length": ["27"], "Date": ["Wed, 10 Mar 2021 02:14:58 GMT"], "Connection": ["keep-alive"], "Content-Type": ["text/html; charset=utf-8"], "X-Content-Type-Options": ["nosniff"]}, "status": 200}
2021/03/10 02:14:58.683 INFO http.log.access.log0 handled request {"request": {"remote_addr": "127.0.0.1:56590", "proto": "HTTP/2.0", "method": "GET", "host": "dev3.foo.com", "uri": "/api", "headers": {"User-Agent": ["curl/7.64.0"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "dev3.foo.com"}}, "common_log": "127.0.0.1 - - [10/Mar/2021:03:14:58 +0100] \"GET /api HTTP/2.0\" 200 27", "duration": 0.002575604, "size": 27, "status": 200, "resp_headers": {"Content-Type": ["text/html; charset=utf-8"], "X-Content-Type-Options": ["nosniff"], "Content-Length": ["27"], "Date": ["Wed, 10 Mar 2021 02:14:58 GMT"], "X-Xss-Protection": ["1; mode=block"], "X-Download-Options": ["noopen"], "Accept-Ranges": ["bytes"], "Server": ["Caddy"], "Strict-Transport-Security": ["max-age=15768000"], "X-Frame-Options": ["DENY"], "Cache-Control": ["no-cache"]}}
1.6153424986834333e+09 info http.log.access.log0 handled request {"request": {"remote_addr": "127.0.0.1:56590", "proto": "HTTP/2.0", "method": "GET", "host": "dev3.foo.com", "uri": "/api", "headers": {"User-Agent": ["curl/7.64.0"], "Accept": ["*/*"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "dev3.foo.com"}}, "common_log": "127.0.0.1 - - [10/Mar/2021:03:14:58 +0100] \"GET /api HTTP/2.0\" 200 27", "duration": 0.002575604, "size": 27, "status": 200, "resp_headers": {"Content-Type": ["text/html; charset=utf-8"], "X-Content-Type-Options": ["nosniff"], "Content-Length": ["27"], "Date": ["Wed, 10 Mar 2021 02:14:58 GMT"], "X-Xss-Protection": ["1; mode=block"], "X-Download-Options": ["noopen"], "Accept-Ranges": ["bytes"], "Server": ["Caddy"], "Strict-Transport-Security": ["max-age=15768000"], "X-Frame-Options": ["DENY"], "Cache-Control": ["no-cache"]}}