ListenerOptions class

Configuration for an individual Kestrel listener.

public class ListenerOptions

Public Members

name description
ListenerOptions() Initializes a new instance of the ListenerOptions class with default values.
DisableAltSvcHeader { get; set; } Gets or sets a value that controls whether the “Alt-Svc” header is included with response headers. The “Alt-Svc” header is used by clients to upgrade HTTP/1.1 and HTTP/2 connections to HTTP/3.
IPAddress { get; set; } The IP address to bind to.
Port { get; set; } The port to listen on.
Protocols { get; set; } HTTP protocols supported by the listener.
UseConnectionLogging { get; set; } Enable verbose connection logging.
UseHttps { get; set; } Whether HTTPS should be used.
X509Certificate { get; } Optional TLS certificate.
override ToString() Returns a string representation of the listener in the format “http(s)://{IPAddress}:{Port}”.

See Also