summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorms <ms@taler.net>2022-05-05 11:22:49 +0200
committerms <ms@taler.net>2022-05-05 11:22:49 +0200
commit4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0 (patch)
tree26e1557b51d130df156881dcc5cb92f4cae80582
parentea304fd0bcca2ee1e965185e939dca637a07eb3e (diff)
downloadlibeufin-4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0.tar.gz
libeufin-4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0.tar.bz2
libeufin-4dfaa3ec3fb0f913a0e2f5d29173dda296391bc0.zip
bind Sandbox only to loopback
-rw-r--r--sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt15
1 files changed, 14 insertions, 1 deletions
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 7e1aca30..4311ab9a 100644
--- 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)