diff --git a/src/main/kotlin/mdnet/netty/ApplicationNetty.kt b/src/main/kotlin/mdnet/netty/ApplicationNetty.kt index 4a7dbd9..dbe0d0b 100644 --- a/src/main/kotlin/mdnet/netty/ApplicationNetty.kt +++ b/src/main/kotlin/mdnet/netty/ApplicationNetty.kt @@ -155,6 +155,7 @@ class Netty( private val devSettings: DevSettings, private val statistics: Statistics ) : ServerConfig { + override fun toServer(http: HttpHandler): Http4kServer = object : Http4kServer { private val transport = NettyTransport.bestForPlatform(serverSettings.threads) @@ -182,7 +183,6 @@ class Netty( bootstrap.group(transport.bossGroup, transport.workerGroup) .channelFactory(transport.factory) .childHandler(object : ChannelInitializer() { - val HAPROXY_SOURCE = AttributeKey.newInstance("haproxy_source") public override fun initChannel(ch: SocketChannel) { if (serverSettings.enableProxyProtocol) { ch.pipeline().addLast( @@ -315,6 +315,7 @@ class Netty( companion object { private val LOGGER = LoggerFactory.getLogger(Netty::class.java) + private val HAPROXY_SOURCE = AttributeKey.newInstance("haproxy_source") } }