diff --git a/README.md b/README.md index 2be912720..088690c10 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ The Soft Serve configuration is simple and straightforward: # The name of the server to show in the TUI. name: Soft Serve -# The host and port to listen on. Defaults to 0.0.0.0:23231. +# The host and port to display in the TUI. You may want to change this if your +# server is accessible from a different host and/or port that what it's +# actually listening on (for example, if it's behind a reverse proxy). host: localhost port: 23231 diff --git a/internal/config/defaults.go b/internal/config/defaults.go index f8af40772..22cf1235c 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -5,7 +5,9 @@ const defaultReadme = "# Soft Serve\n\n Welcome! You can configure your Soft Ser const defaultConfig = `# The name of the server to show in the TUI. name: Soft Serve -# The host and port to listen on. Defaults to 0.0.0.0:23231. +# The host and port to display in the TUI. You may want to change this if your +# server is accessible from a different host and/or port that what it's +# actually listening on (for example, if it's behind a reverse proxy). host: %s port: %d diff --git a/server/server.go b/server/server.go index 559162961..e7ab0cf23 100644 --- a/server/server.go +++ b/server/server.go @@ -32,17 +32,6 @@ func NewServer(cfg *config.Config) *Server { if err != nil { log.Fatal(err) } - - // If the host and port are set in config.yaml, and they weren't set in the - // environment, update the environment level config accordingly, which is - // the config used to start the server. - if cfg.Host == "" { - cfg.Host = ac.Host - } - if cfg.Port == 0 { - cfg.Port = ac.Port - } - mw := []wish.Middleware{ bm.Middleware(tui.SessionHandler(ac)), gm.Middleware(cfg.RepoPath, ac),