Skip to content

Commit

Permalink
[+] disable web user interface if --web-addr is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Oct 29, 2024
1 parent 5883609 commit 2d7cb1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/cmdopts/cmdoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ func (c *Options) NeedsSchemaUpgrade() (upgrade bool, err error) {

// InitWebUI initializes the web UI server
func (c *Options) InitWebUI(fs fs.FS, logger log.LoggerIface) error {
if c.WebUI.WebAddr == "" {
logger.Info("web user interface is disabled")
return nil
}
if webserver.Init(c.WebUI, fs, c.MetricsReaderWriter, c.SourcesReaderWriter, logger) == nil {
return errors.New("failed to initialize web UI")
}
Expand Down

0 comments on commit 2d7cb1b

Please sign in to comment.