notifier: Verify that the given webhook endpoint is an absolute URL

pull/139/head
Quentin Machu 8 years ago
parent 2fb815dc37
commit 927af43be0

@ -78,7 +78,7 @@ func (h *WebhookNotifier) Configure(config *config.NotifierConfig) (bool, error)
if httpConfig.Endpoint == "" {
return false, nil
}
if _, err := url.Parse(httpConfig.Endpoint); err != nil {
if _, err := url.ParseRequestURI(httpConfig.Endpoint); err != nil {
return false, fmt.Errorf("could not parse endpoint URL: %s\n", err)
}
h.endpoint = httpConfig.Endpoint

Loading…
Cancel
Save