diff options
author | Sebastian <sebasjm@gmail.com> | 2022-11-01 15:35:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-11-01 15:35:53 -0300 |
commit | 5822f89f770978303bfa2079854535b8e83831ec (patch) | |
tree | 12089cb55a2c3fcb344782f9be9a7b3236022bb8 /nexus/src/main/kotlin/tech/libeufin/nexus/server | |
parent | d90fb73b1d1926ccbc11a4fdd89c253fab6fb626 (diff) | |
download | libeufin-5822f89f770978303bfa2079854535b8e83831ec.tar.gz libeufin-5822f89f770978303bfa2079854535b8e83831ec.tar.bz2 libeufin-5822f89f770978303bfa2079854535b8e83831ec.zip |
add support for ipv4 only system
Diffstat (limited to 'nexus/src/main/kotlin/tech/libeufin/nexus/server')
-rw-r--r-- | nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt index ea019d6b..8c4e6dbe 100644 --- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt +++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt @@ -1051,7 +1051,7 @@ val nexusApp: Application.() -> Unit = { } } } -fun serverMain(port: Int, localhostOnly: Boolean) { +fun serverMain(port: Int, localhostOnly: Boolean, ipv4Only: Boolean) { val server = embeddedServer( Netty, environment = applicationEngineEnvironment { @@ -1059,7 +1059,7 @@ fun serverMain(port: Int, localhostOnly: Boolean) { this.port = port this.host = if (localhostOnly) "127.0.0.1" else "0.0.0.0" } - connector { + if (!ipv4Only) connector { this.port = port this.host = if (localhostOnly) "[::1]" else "[::]" } |