HttpsRedirect

class HttpsRedirect

Redirect non-secure requests to HTTPS

Types

Configuration

class Configuration

Redirect feature configuration

Feature

companion object Feature : 
    ApplicationFeature<ApplicationCallPipeline, Configuration, HttpsRedirect>

Feature installation object

Constructors

<init>

HttpsRedirect(config: Configuration)

Redirect non-secure requests to HTTPS

Properties

excludePredicates

val excludePredicates: List<(ApplicationCall) -> Boolean>

The list of call predicates for redirect exclusion. Any call matching any of the predicates will not be redirected by this feature.

permanent

val permanent: Boolean

If it does permanent redirect

redirectPort

val redirectPort: Int

HTTPS port to redirect to

Companion Object Properties

key

Unique key that identifies a feature

Companion Object Functions

install

fun install(
    pipeline: ApplicationCallPipeline,
    configure: Configuration.() -> Unit
): HttpsRedirect

Feature installation script