diff --git a/CHANGELOG.md b/CHANGELOG.md index 313cbba60..c6861ea83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ _Enhancements_ _Bug fixes_ * `log_level` workspace setting is ignored. ([#618](https://github.com/turbot/flowpipe/issues/618)) +* Default "listen" flag should be network, not localhost ([#694](https://github.com/turbot/flowpipe/issues/694)) ## v0.2.3 [2024-02-13] diff --git a/internal/cmd/server.go b/internal/cmd/server.go index 8449e387e..0762a1dfe 100644 --- a/internal/cmd/server.go +++ b/internal/cmd/server.go @@ -37,7 +37,7 @@ func serverCmd() *cobra.Command { OnCmd(cmd). AddIntFlag(constants.ArgPort, localconstants.DefaultServerPort, "Server port."). AddStringFlag(constants.ArgListen, localconstants.DefaultListen, "Listen address port."). - AddStringFlag(constants.ArgBaseUrl, "", "Base URL for the webhook triggers and webform input (http://localhost:7103)."). + AddStringFlag(constants.ArgBaseUrl, "http://localhost:7103", "Base URL for the webhook triggers and webform input (http://localhost:7103)."). AddBoolFlag(constants.ArgWatch, true, "Watch mod files for changes when running Flowpipe server"). AddBoolFlag(constants.ArgVerbose, false, "Enable verbose output") diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 8aa89898f..b1d08fc99 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -6,7 +6,7 @@ import ( const ( DefaultServerPort = 7103 - DefaultListen = "localhost" + DefaultListen = "network" DefaultExecutionMode = ExecutionModeAsynchronous DefaultWaitRetry = 60 ExecutionModeSynchronous = "synchronous" diff --git a/internal/service/manager/manager_option.go b/internal/service/manager/manager_option.go index 54cda3c48..85e1fc0bf 100644 --- a/internal/service/manager/manager_option.go +++ b/internal/service/manager/manager_option.go @@ -16,7 +16,7 @@ func WithServerConfig(addr string, port int) ManagerOption { // "local" -> "localhost" // "network" -> "" , i.e. listen on all addresses switch addr { - case "local": + case "local", "localhost": // listen on local host m.HTTPAddress = "localhost" case "network":