mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
pomerium-cli: add support for a custom browser command (#2617)
This commit is contained in:
parent
efffe57bf0
commit
a7442b1498
8 changed files with 58 additions and 17 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue