pomerium-cli: add support for a custom browser command (#2617)

This commit is contained in:
Caleb Doxsey 2021-09-21 08:31:30 -06:00 committed by GitHub
parent efffe57bf0
commit a7442b1498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 17 deletions

View file

@ -9,10 +9,11 @@ import (
)
type config struct {
jwtCache cliutil.JWTCache
dstHost string
proxyHost string
tlsConfig *tls.Config
jwtCache cliutil.JWTCache
dstHost string
proxyHost string
tlsConfig *tls.Config
browserConfig string
}
func getConfig(options ...Option) *config {
@ -32,6 +33,13 @@ func getConfig(options ...Option) *config {
// An Option modifies the config.
type Option func(*config)
// WithBrowserCommand returns an option to configure the browser command.
func WithBrowserCommand(browserCommand string) Option {
return func(cfg *config) {
cfg.browserConfig = browserCommand
}
}
// WithDestinationHost returns an option to configure the destination host.
func WithDestinationHost(dstHost string) Option {
return func(cfg *config) {