(proxy, internal/config, internal/log, docs): opt-in websocket support

This commit is contained in:
Tejasvi Nareddy 2019-05-30 22:20:22 -04:00 committed by Teju Nareddy
parent cf61c6be3d
commit f966e5ab19
6 changed files with 55 additions and 4 deletions

View file

@ -129,6 +129,10 @@ type Options struct {
// Sub-routes
Routes map[string]string `mapstructure:"routes"`
DefaultUpstreamTimeout time.Duration `mapstructure:"default_upstream_timeout"`
// Enable proxying of websocket connections. Defaults to "false".
// Caution: Enabling this feature could result in abuse via DOS attacks.
AllowWebsockets bool `mapstructure:"allow_websockets"`
}
// NewOptions returns a new options struct with default values
@ -160,6 +164,7 @@ func NewOptions() *Options {
AuthenticateInternalAddr: new(url.URL),
AuthorizeURL: new(url.URL),
RefreshCooldown: time.Duration(5 * time.Minute),
AllowWebsockets: false,
}
return o
}