Skip to content

Commit

Permalink
Default "listen" flag should be network, not localhost. Fixes #694.
Browse files Browse the repository at this point in the history
  • Loading branch information
vhadianto committed Feb 21, 2024
1 parent 600f9ad commit f32656f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion internal/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

const (
DefaultServerPort = 7103
DefaultListen = "localhost"
DefaultListen = "network"
DefaultExecutionMode = ExecutionModeAsynchronous
DefaultWaitRetry = 60
ExecutionModeSynchronous = "synchronous"
Expand Down
2 changes: 1 addition & 1 deletion internal/service/manager/manager_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit f32656f

Please sign in to comment.