commit 4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0 parent ea304fd0bcca2ee1e965185e939dca637a07eb3e Author: ms <ms@taler.net> Date: Thu, 5 May 2022 11:22:49 +0200 bind Sandbox only to loopback Diffstat:
| M | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | | | 15 | ++++++++++++++- |
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -1505,7 +1505,20 @@ val sandboxApp: Application.() -> Unit = { } fun serverMain(port: Int) { - val server = embeddedServer(Netty, port = port, module = sandboxApp) + val server = embeddedServer( + Netty, + environment = applicationEngineEnvironment{ + connector { + this.port = port + this.host = "127.0.0.1" + } + connector { + this.port = port + this.host = "[::1]" + } + module(sandboxApp) + } + ) logger.info("LibEuFin Sandbox running on port $port") try { server.start(wait = true)