From d59548fbab4cc950bcaf0b3a530bfa30b0470d9d Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Wed, 10 Nov 2021 17:28:47 +0100 Subject: [PATCH] Enable HTTP 2 again (#2720) We are re-enabling HTTP 2 again. There has been a few bugfixes upstream in go, and we have also enabled ReadIdleTimeout. Signed-off-by: Julien Pivotto --- notify/opsgenie/opsgenie.go | 2 +- notify/pagerduty/pagerduty.go | 2 +- notify/pushover/pushover.go | 2 +- notify/slack/slack.go | 2 +- notify/sns/sns.go | 2 +- notify/victorops/victorops.go | 2 +- notify/webhook/webhook.go | 2 +- notify/wechat/wechat.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/notify/opsgenie/opsgenie.go b/notify/opsgenie/opsgenie.go index 89ae217d..5419cbea 100644 --- a/notify/opsgenie/opsgenie.go +++ b/notify/opsgenie/opsgenie.go @@ -45,7 +45,7 @@ type Notifier struct { // New returns a new OpsGenie notifier. func New(c *config.OpsGenieConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "opsgenie", httpOpts...) if err != nil { return nil, err } diff --git a/notify/pagerduty/pagerduty.go b/notify/pagerduty/pagerduty.go index 3e90db7c..6c6465f5 100644 --- a/notify/pagerduty/pagerduty.go +++ b/notify/pagerduty/pagerduty.go @@ -49,7 +49,7 @@ type Notifier struct { // New returns a new PagerDuty notifier. func New(c *config.PagerdutyConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pagerduty", httpOpts...) if err != nil { return nil, err } diff --git a/notify/pushover/pushover.go b/notify/pushover/pushover.go index 5dd555d7..eae0af00 100644 --- a/notify/pushover/pushover.go +++ b/notify/pushover/pushover.go @@ -43,7 +43,7 @@ type Notifier struct { // New returns a new Pushover notifier. func New(c *config.PushoverConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "pushover", httpOpts...) if err != nil { return nil, err } diff --git a/notify/slack/slack.go b/notify/slack/slack.go index b297caea..08dd783b 100644 --- a/notify/slack/slack.go +++ b/notify/slack/slack.go @@ -43,7 +43,7 @@ type Notifier struct { // New returns a new Slack notification handler. func New(c *config.SlackConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "slack", httpOpts...) if err != nil { return nil, err } diff --git a/notify/sns/sns.go b/notify/sns/sns.go index c947b1b6..281e46a8 100644 --- a/notify/sns/sns.go +++ b/notify/sns/sns.go @@ -48,7 +48,7 @@ type Notifier struct { // New returns a new SNS notification handler. func New(c *config.SNSConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "sns", httpOpts...) if err != nil { return nil, err } diff --git a/notify/victorops/victorops.go b/notify/victorops/victorops.go index 8b83546f..3fdbf41d 100644 --- a/notify/victorops/victorops.go +++ b/notify/victorops/victorops.go @@ -42,7 +42,7 @@ type Notifier struct { // New returns a new VictorOps notifier. func New(c *config.VictorOpsConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "victorops", httpOpts...) if err != nil { return nil, err } diff --git a/notify/webhook/webhook.go b/notify/webhook/webhook.go index 59c7ee5f..00c52502 100644 --- a/notify/webhook/webhook.go +++ b/notify/webhook/webhook.go @@ -41,7 +41,7 @@ type Notifier struct { // New returns a new Webhook. func New(conf *config.WebhookConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*conf.HTTPConfig, "webhook", httpOpts...) if err != nil { return nil, err } diff --git a/notify/wechat/wechat.go b/notify/wechat/wechat.go index 63f9ab4e..762d467a 100644 --- a/notify/wechat/wechat.go +++ b/notify/wechat/wechat.go @@ -72,7 +72,7 @@ type weChatResponse struct { // New returns a new Wechat notifier. func New(c *config.WechatConfig, t *template.Template, l log.Logger, httpOpts ...commoncfg.HTTPClientOption) (*Notifier, error) { - client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", append(httpOpts, commoncfg.WithHTTP2Disabled())...) + client, err := commoncfg.NewClientFromConfig(*c.HTTPConfig, "wechat", httpOpts...) if err != nil { return nil, err }