Add validation to webhook and service URLs to ensure they are not blocked because of SSRF
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18058, we improved the "URL blocked" error message and display it when testing a service, but we can catch this earlier by adding a new validator that runs the URL blocker, which we could also use for webhook URLs.
This is similar to the existing ImportableUrlValidator
, and we also have a UrlValidator
and AddressableUrlValidator
. We may want to do some cleanup to make it clearer which is to be used when.