An array of strings or a Buffer naming possible ALPN protocols. (Protocols should be ordered by their priority.)
SNICallback(servername, cb)
When enabled, TLS packet trace information is written to stderr
. This can be
used to debug TLS connection problems.
If you use http2 protocol You should choose between a server with or without TLS layer
Disable it is highly discouraged because majority of navigator disallow http2 without a secure layer
Optionally set the maximum TLS version to allow. One
of 'TLSv1.3'
, 'TLSv1.2'
, 'TLSv1.1'
, or 'TLSv1'
. Cannot be specified along with the
secureProtocol
option, use one or the other.
Default: 'TLSv1.3'
, unless changed using CLI options. Using
--tls-max-v1.2
sets the default to 'TLSv1.2'
. Using --tls-max-v1.3
sets the default to
'TLSv1.3'
. If multiple of the options are provided, the highest maximum is used.
Optionally set the minimum TLS version to allow. One
of 'TLSv1.3'
, 'TLSv1.2'
, 'TLSv1.1'
, or 'TLSv1'
. Cannot be specified along with the
secureProtocol
option, use one or the other. It is not recommended to use
less than TLSv1.2, but it may be required for interoperability.
Default: 'TLSv1.2'
, unless changed using CLI options. Using
--tls-v1.0
sets the default to 'TLSv1'
. Using --tls-v1.1
sets the default to
'TLSv1.1'
. Using --tls-min-v1.3
sets the default to
'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
The server protocol
If true the server will reject any connection which is not authorized with the list of supplied CAs. This option only has an effect if requestCert is true.
If true the server will request a certificate from clients that connect and attempt to verify that certificate. Defaults to false.
An optional TLS context object from tls.createSecureContext()
Set to true if you want a self signed ssl certificate Generated for runtime.
Generated using TypeDoc
For complete available options :
Base InitOptions:
Others options are shared between ServerOptions and SecureServerOptions
If you need use your own ssl certificates :
You can eventually need to :
https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener
https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
https://nodejs.org/api/http2.html#http2_http2_createserver_options_onrequesthandler
https://nodejs.org/api/http2.html#http2_http2_createsecureserver_options_onrequesthandler