staticZip

fun Route.staticZip(remotePath: String, basePath: String?, zip: Path, index: String? = "index.html", block: StaticContentConfig<Path>.() -> Unit = {}): Route(source)

Sets up RoutingRoot to serve contents of zip as static content. All paths inside basePath will be accessible recursively at "remotePath/path/to/resource". If a requested path doesn't exist and index is not null, then response will be index path in the requested package.

If a requested path doesn't exist and no index specified, response will be 404 Not Found.

You can use block for additional setup.

Report a problem