notifier: Verify that the given webhook endpoint is an absolute URL
This commit is contained in:
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…
Reference in New Issue
Block a user