diff --git a/src/main/kotlin/mdnet/netty/ApplicationNetty.kt b/src/main/kotlin/mdnet/netty/ApplicationNetty.kt index 60321e2..4e1cbdd 100644 --- a/src/main/kotlin/mdnet/netty/ApplicationNetty.kt +++ b/src/main/kotlin/mdnet/netty/ApplicationNetty.kt @@ -221,8 +221,12 @@ class Netty( "dropHostname", object : ChannelInboundHandlerAdapter() { private val hostToTest = remoteSettings.url.authority.let { - println(it) - it.substring(0, it.lastIndexOf(":")) + val colon = it.lastIndexOf(":") + if (colon != -1) { + it.substring(0, colon) + } else { + it + } } override fun userEventTriggered(ctx: ChannelHandlerContext, evt: Any) {