KwebConfiguration

abstract class KwebConfiguration

A configuration class for Kweb parameterization. Extend this if you have custom needs on how to inject configuration values, otherwise KwebDefaultConfiguration is probably good enough for your use case

Please note this is not Kweb.Feature.Configuration, which is a Ktor specific config block

Constructors

KwebConfiguration
Link copied to clipboard
fun KwebConfiguration()

Functions

faviconIco
Link copied to clipboard
open suspend fun faviconIco(call: ApplicationCall)
Override the default robots.txt behavior, which is to return with a 404.
robotsTxt
Link copied to clipboard
open suspend fun robotsTxt(call: ApplicationCall)
Override the default robots.txt behavior, which is to return with a 404.
validate
Link copied to clipboard
fun validate()
Values are initialized eagerly, but objects are not, so be sure to "touch" this class on initialization for failing fast.

Properties

buildpageTimeout
Link copied to clipboard
abstract val buildpageTimeout: Duration
If Kweb.debug is enabled, then pages that take longer than buildpageTimeout to load will display a warning messageSee Duration.parse for valid formats, e.
clientStateStatsEnabled
Link copied to clipboard
abstract val clientStateStatsEnabled: Boolean
Enable stats for the client state cache.
clientStateTimeout
Link copied to clipboard
abstract val clientStateTimeout: Duration
Clients that last connected more than clientStateTimeout will be cleaned up every minute.

Inheritors

KwebDefaultConfiguration
Link copied to clipboard