Skip to content

Commit

Permalink
[+] add --web-disable command-line option to disable web UI and REST
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Oct 30, 2024
1 parent b1061e8 commit b603a50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmdopts/cmdoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ 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 == "" {
if c.WebUI.WebDisable {
logger.Info("web user interface is disabled")
return nil
}
Expand Down
1 change: 1 addition & 0 deletions internal/webserver/cmdopts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package webserver

// CmdOpts specifies the internal web UI server command-line options
type CmdOpts struct {
WebDisable bool `long:"web-disable" mapstructure:"web-disable" description:"Disable the web UI" env:"PW_WEBDISABLE"`
WebAddr string `long:"web-addr" mapstructure:"web-addr" description:"TCP address in the form 'host:port' to listen on" default:":8080" env:"PW_WEBADDR"`
WebUser string `long:"web-user" mapstructure:"web-user" description:"Admin login" env:"PW_WEBUSER"`
WebPassword string `long:"web-password" mapstructure:"web-password" description:"Admin password" env:"PW_WEBPASSWORD"`
Expand Down

0 comments on commit b603a50

Please sign in to comment.