KestrunHost.AddStaticFiles method (1 of 2)

Adds static files to the application. This overload allows you to specify configuration options.

public KestrunHost AddStaticFiles(Action<StaticFileOptions>? cfg = null)
parameter description
cfg The static file options to configure.

Return Value

The current KestrunHost instance.

See Also


KestrunHost.AddStaticFiles method (2 of 2)

Adds static files to the application. This overload allows you to specify configuration options.

public KestrunHost AddStaticFiles(StaticFileOptions options, 
    CacheControlHeaderValue? cacheControl = null)
parameter description
options The static file options to configure.
cacheControl Optional cache control headers to apply to static file responses.

Return Value

The current KestrunHost instance.

See Also