RequestConnectionPoint

Represents request address information is used to make a call. There are at least two possible instances: "local" is how we see request at the server application and "actual" is what we can recover from proxy provided headers.

Properties

Link copied to clipboard
abstract val host: String

Request host, useful for virtual hosts routing

Link copied to clipboard
abstract val localAddress: String

IP address on which the request was received.

Link copied to clipboard
abstract val localHost: String

Host on which the request was received, is useful for virtual hosts routing

Link copied to clipboard
abstract val localPort: Int

Port on which the request was received, for example 80 or 443

Link copied to clipboard
abstract val method: HttpMethod

Request HTTP method

Link copied to clipboard
abstract val port: Int

Port, for example 80 or 443

Link copied to clipboard
abstract val remoteAddress: String

Client address. For io.ktor.application.ApplicationRequest.local instance could point to a proxy our application running behind. NEVER use it for user authentication as it can be easily falsified (user can simply set some HTTP headers such as X-Forwarded-Host so you should NEVER rely on it in any security checks). If you are going to use it to create a back-connection, please do it with care as an offender can easily use it to force you to connect to some host that is not intended to be connected to so that may cause serious consequences.

Link copied to clipboard
abstract val remoteHost: String

Client address or host name if it can be resolved. For io.ktor.application.ApplicationRequest.local instance could point to a proxy our application running behind. NEVER use it for user authentication as it can be easily falsified (user can simply set some HTTP headers such as X-Forwarded-Host so you should NEVER rely on it in any security checks). If you are going to use it to create a back-connection, please do it with care as an offender can easily use it to force you to connect to some host that is not intended to be connected to so that may cause serious consequences.

Link copied to clipboard
abstract val remotePort: Int

Client port. For io.ktor.application.ApplicationRequest.local instance could point to a proxy our application running behind. NEVER use it for user authentication as it can be easily falsified (user can simply set some HTTP headers such as X-Forwarded-Host so you should NEVER rely on it in any security checks). If you are going to use it to create a back-connection, please do it with care as an offender can easily use it to force you to connect to some host that is not intended to be connected to so that may cause serious consequences.

Link copied to clipboard
abstract val scheme: String

Scheme, for example "http" or "https"

Link copied to clipboard
abstract val serverHost: String

Host to which the request was sent, is useful for virtual hosts routing

Link copied to clipboard
abstract val serverPort: Int

Port to which the request was sent, for example, 80 or 443

Link copied to clipboard
abstract val uri: String

URI path with no host, port and no schema specification, but possibly with query

Link copied to clipboard
abstract val version: String

Protocol version string