undici
undici copied to clipboard
Filter tls options
Determine which tls options actually make sense to forward to tls.connect
and throw if any other is provided (e.g. allowHalfOpen
).
@delvedor Would you mind looking at this? I would like to move the tls options out on root instead of making it possible to pass anything in an nested options object and surprise us.
Other than "pass anything in an nested options object and surprise us.", what problems do you foresee here?
what problems do you foresee here?
It's a bit unclear what option exactly we support or not.
Since we are passing those opts to the core tls library, all of them? I fear I'm missing something 🤔
Since we are passing those opts to the core tls library, all of them? I fear I'm missing something 🤔
We don't support all of them: https://nodejs.org/api/tls.html#tls_new_tls_tlssocket_socket_options. Some of them don't make any sense in our context.
I think rejectUnauthorized
is the only relevant one. But I don't have a good understanding of all of the existing options.
Let's keep them for know. When and if it will become a problem, we will have more context to make this decision :)