Skip to content

Commit

Permalink
Trim contents of slack api urls from files
Browse files Browse the repository at this point in the history
  • Loading branch information
srhb committed May 23, 2022
1 parent f958b8b commit 050acf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notify/slack/slack.go
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"strings"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
Expand Down Expand Up @@ -194,7 +195,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
if err != nil {
return false, err
}
u = string(content)
u = strings.TrimSpace(string(content))
}

resp, err := notify.PostJSON(ctx, n.client, u, &buf)
Expand Down

0 comments on commit 050acf7

Please sign in to comment.