The transportSecurity and supportedHTTPVersions arguments of NIOHTTPServerConfiguration must be compatible with each other to form a valid configuration. For example, if transportSecurity == .plaintext, then supportedHTTPVersions must not contain .http3.
Currently, we validate the compatibility at runtime, but in #107 (comment), it was discussed that enforcing these checks through the type system would form a better API. In particular, the idea of specifying a separate transport security for each HTTP version was brought up. See the thread for more details.
The
transportSecurityandsupportedHTTPVersionsarguments ofNIOHTTPServerConfigurationmust be compatible with each other to form a valid configuration. For example, iftransportSecurity == .plaintext, thensupportedHTTPVersionsmust not contain.http3.Currently, we validate the compatibility at runtime, but in #107 (comment), it was discussed that enforcing these checks through the type system would form a better API. In particular, the idea of specifying a separate transport security for each HTTP version was brought up. See the thread for more details.