basic reserved services (#41)

This commit is contained in:
Michael Quigley 2022-11-29 16:47:23 -05:00
parent 6841704b90
commit a0ac221970
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -27,6 +27,7 @@ func init() {
type sharePrivateCommand struct {
basicAuth []string
reserve bool
cmd *cobra.Command
}
@ -38,6 +39,7 @@ func newSharePrivateCommand() *sharePrivateCommand {
}
command := &sharePrivateCommand{cmd: cmd}
cmd.Flags().StringArrayVar(&command.basicAuth, "basic-auth", []string{}, "Basic authentication users (<username:password>,...")
cmd.Flags().BoolVar(&command.reserve, "reserve", false, "Reserve the service (don't free after exit)")
cmd.Run = command.run
return command
}
@ -89,6 +91,7 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) {
BackendMode: "proxy",
BackendProxyEndpoint: cfg.EndpointAddress,
AuthScheme: string(model.None),
Reserve: cmd.reserve,
}
if len(cmd.basicAuth) > 0 {
logrus.Infof("configuring basic auth")