bodyLimit

fun bodyLimit(block: (ApplicationCall) -> Long)

Sets a limit for the maximum allowed size for incoming request bodies. The block should return Long.MAX_VALUE if the body size is unlimited.