diff --git a/core/src/main/scala/io/amient/affinity/core/actor/GatewayHttp.scala b/core/src/main/scala/io/amient/affinity/core/actor/GatewayHttp.scala index 41be8f83..06f24ee7 100644 --- a/core/src/main/scala/io/amient/affinity/core/actor/GatewayHttp.scala +++ b/core/src/main/scala/io/amient/affinity/core/actor/GatewayHttp.scala @@ -63,10 +63,10 @@ trait GatewayHttp extends Gateway { val interfaces: List[HttpInterface] = listenerConfigs.map(new HttpInterface(_)).toList - private val listeners: List[InetSocketAddress] = interfaces.map(_.bind(self)) - private val onlineCounter = metrics.counter("http.gateway." + interfaces.head.port) + private lazy val listeners: List[InetSocketAddress] = interfaces.map(_.bind(self)) + private implicit val executor = scala.concurrent.ExecutionContext.Implicits.global abstract override def preStart(): Unit = { diff --git a/examples/example-https-config/Affinity_Https_Example.postman_collection.json b/examples/example-https-config/Affinity_Https_Example.postman_collection.json index 3ecbaaee..93eebfd6 100644 --- a/examples/example-https-config/Affinity_Https_Example.postman_collection.json +++ b/examples/example-https-config/Affinity_Https_Example.postman_collection.json @@ -15,7 +15,7 @@ { "id": "2043a112-0265-939e-2f48-2246c33db33f", "headers": "", - "url": "http://localhost:8881/store/1", + "url": "http://localhost:18881/store/1", "pathVariables": {}, "preRequestScript": null, "method": "GET", @@ -35,7 +35,7 @@ { "id": "53b821a4-74d3-684c-1b3c-d86910b295b8", "headers": "", - "url": "http://localhost:8881/ping", + "url": "http://localhost:18881/ping", "pathVariables": {}, "preRequestScript": null, "method": "GET", @@ -55,7 +55,7 @@ { "id": "bb39b234-6e07-d78d-053e-bc665c24cc89", "headers": "", - "url": "http://localhost:8881/store/1?value=abc", + "url": "http://localhost:18881/store/1?value=abc", "pathVariables": {}, "preRequestScript": null, "method": "PUT", diff --git a/examples/example-https-config/src/main/resources/https-example.conf b/examples/example-https-config/src/main/resources/https-example.conf index 2709f74b..9e02db7e 100644 --- a/examples/example-https-config/src/main/resources/https-example.conf +++ b/examples/example-https-config/src/main/resources/https-example.conf @@ -35,7 +35,7 @@ affinity { listeners = [ { host = "0.0.0.0" - port = 8881 + port = 18881 prefix = "/secure" tls.keystore { password = "123456" @@ -45,7 +45,7 @@ affinity { }, { host = "0.0.0.0" - port = 8882 + port = 18882 prefix = "/unsafe" } ]