How to get Client IP with ktor

Viewed 1525

Hey i tried to get the ip of the client with ktor.

I used the method

this.context.request.local.remoteHost

(this.context is an Instance of ApplicationCall)

How can i get the real ip an not something like "********.dip0.t-ipconnect.de"

1 Answers

You can also get a remote host from the request's origin: call.request.origin.remoteHost but it returns IP address in not every case too. I've created an issue in Ktor's bug tracker to address this problem.

Related