Log the upstream ssl cipher and the server cert

What I’m trying to do: Use nginx as a proxy to a remote server where my client sends websocket requests to nginx and it should encrypt and send them to remote server. This works fine, but now I need to know what is the cipher used for the secure connection it established with the remote server and also the server certificate

Where I’m stuck:
Not able to get the ssl info of the upstream connection

What I’ve already tried:
Even tried to use lua plugins to log the upstream ssl info, but couldn’t do it

Heya! Sorry for the very delayed bump. In case you haven’t figured this out already, you want to look at the proxy_ssl_* directives (they start here Module ngx_http_proxy_module) since that is where you can define how NGINX connects to the remote server it is proxying to.