diff --git a/ballerina-tests/Dependencies.toml b/ballerina-tests/Dependencies.toml index 9b46347c8..03842b937 100644 --- a/ballerina-tests/Dependencies.toml +++ b/ballerina-tests/Dependencies.toml @@ -121,7 +121,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.6" +version = "2.10.7" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 1b645fb20..61e918ed5 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -105,7 +105,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.6" +version = "2.10.7" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, diff --git a/ballerina/constants.bal b/ballerina/constants.bal index 9a85726d5..5afd32227 100644 --- a/ballerina/constants.bal +++ b/ballerina/constants.bal @@ -81,3 +81,6 @@ const PATH = "path"; // Constants related to the DataLoader const DEFAULT_PREFETCH_METHOD_NAME_PREFIX = "pre"; + +// Localhost +const LOCALHOST = "localhost"; diff --git a/ballerina/listener.bal b/ballerina/listener.bal index 2cff796e7..bc9b4d5bb 100644 --- a/ballerina/listener.bal +++ b/ballerina/listener.bal @@ -46,14 +46,13 @@ public class Listener { } self.wsListener = (); self.graphiql = {}; - string host = configuration.host; int port = self.httpListener.getPort(); if configuration.secureSocket is () { - self.httpEndpoint = string `http://${host}:${port}`; - self.websocketEndpoint = string `ws://${host}:${port}`; + self.httpEndpoint = string `http://${LOCALHOST}:${port}`; + self.websocketEndpoint = string `ws://${LOCALHOST}:${port}`; } else { - self.httpEndpoint = string `https://${host}:${port}`; - self.websocketEndpoint = string `wss://${host}:${port}`; + self.httpEndpoint = string `https://${LOCALHOST}:${port}`; + self.websocketEndpoint = string `wss://${LOCALHOST}:${port}`; } }