1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Fix me being bad

This commit is contained in:
carbotaniuman 2021-12-01 11:44:10 -06:00
parent 38145a38dd
commit dbbd6c11d3

View file

@ -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) {