KestrunHttpMiddlewareExtensions.AddRateLimiter method (1 of 2)

Adds rate limiting to the application using the specified configuration delegate.

public static KestrunHost AddRateLimiter(this KestrunHost host, 
    Action<RateLimiterOptions>? cfg = null)
parameter description
host The KestrunHost instance to configure.
cfg An optional delegate to configure rate limiting options.

Return Value

The current KestrunHost instance.

See Also


KestrunHttpMiddlewareExtensions.AddRateLimiter method (2 of 2)

Adds rate limiting to the application using the specified RateLimiterOptions.

public static KestrunHost AddRateLimiter(this KestrunHost host, RateLimiterOptions cfg)
parameter description
host The KestrunHost instance to configure.
cfg The configuration options for rate limiting.

Return Value

The current KestrunHost instance.

See Also