libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit eb937c60e48893409012fbe0584a270e91452a79
parent 4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0
Author: ms <ms@taler.net>
Date:   Thu,  5 May 2022 11:25:12 +0200

bind Nexus only to loopback

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt @@ -36,6 +36,7 @@ import io.ktor.client.* import io.ktor.features.* import io.ktor.http.* import io.ktor.jackson.* +import io.ktor.network.sockets.* import io.ktor.request.* import io.ktor.response.* import io.ktor.routing.* @@ -1051,7 +1052,20 @@ val nexusApp: Application.() -> Unit = { } } fun serverMain(port: Int) { - val server = embeddedServer(Netty, port = port, module = nexusApp) + val server = embeddedServer( + Netty, + environment = applicationEngineEnvironment { + connector { + this.port = port + this.host = "127.0.0.1" + } + connector { + this.port = port + this.host = "[::1]" + } + module(nexusApp) + } + ) logger.info("LibEuFin Nexus running on port $port") try { server.start(wait = true)