@@ -138,6 +138,7 @@ var (
138138 Version : version ,
139139 Host : viper .GetString ("host" ),
140140 Port : viper .GetInt ("port" ),
141+ ListenHost : viper .GetString ("listen-host" ),
141142 BaseURL : viper .GetString ("base-url" ),
142143 ResourcePath : viper .GetString ("base-path" ),
143144 ExportTranslations : viper .GetBool ("export-translations" ),
@@ -184,6 +185,7 @@ func init() {
184185
185186 // HTTP-specific flags
186187 httpCmd .Flags ().Int ("port" , 8082 , "HTTP server port" )
188+ httpCmd .Flags ().String ("listen-host" , "" , "Host the HTTP server binds to (e.g. 127.0.0.1). Empty binds to all interfaces." )
187189 httpCmd .Flags ().String ("base-url" , "" , "Base URL where this server is publicly accessible (for OAuth resource metadata)" )
188190 httpCmd .Flags ().String ("base-path" , "" , "Externally visible base path for the HTTP server (for OAuth resource metadata)" )
189191 httpCmd .Flags ().Bool ("scope-challenge" , false , "Enable OAuth scope challenge responses" )
@@ -204,6 +206,7 @@ func init() {
204206 _ = viper .BindPFlag ("insiders" , rootCmd .PersistentFlags ().Lookup ("insiders" ))
205207 _ = viper .BindPFlag ("repo-access-cache-ttl" , rootCmd .PersistentFlags ().Lookup ("repo-access-cache-ttl" ))
206208 _ = viper .BindPFlag ("port" , httpCmd .Flags ().Lookup ("port" ))
209+ _ = viper .BindPFlag ("listen-host" , httpCmd .Flags ().Lookup ("listen-host" ))
207210 _ = viper .BindPFlag ("base-url" , httpCmd .Flags ().Lookup ("base-url" ))
208211 _ = viper .BindPFlag ("base-path" , httpCmd .Flags ().Lookup ("base-path" ))
209212 _ = viper .BindPFlag ("scope-challenge" , httpCmd .Flags ().Lookup ("scope-challenge" ))
0 commit comments