Getting remote IP using Netty

I’m trying to add an access log to my Tapir application. Using NettySyncServer.

I can’t find any way to get the remote IP address in my intercepter. I can look at the request ConnectionInfo but all three values, local, remote and secure are all None.

Somehow it looks like this shouldn’t be hard. I’ve done this in Play and Cask apps.

Suggestions welcome.

ConnectionInfo should be the place, but I see it’s not populated properly here: tapir/server/netty-server/src/main/scala/sttp/tapir/server/netty/NettyServerRequest.scala at master · softwaremill/tapir · GitHub. I’ll see if this is a quick fix or not.

See: Implement ServerRequest.connectionInfo for Netty servers by adamw · Pull Request #4853 · softwaremill/tapir · GitHub