Testing a webhook results in error 500
URL: https://OUR_GITLAB/GROUP/PROJECT/hooks/14/test?trigger=push_events
Result:
Log:
Gitlab::HTTP::BlockedUrlError (URL 'https://DOMAIN_THAT_RESOLVES_TO_10_x_x_x/project/stage-iad2-gate-chef-deploy' is blocked: Requests to the local network are not allowed):
lib/gitlab/proxy_http_connection_adapter.rb:17:in `rescue in connection'
lib/gitlab/proxy_http_connection_adapter.rb:14:in `connection'
app/services/web_hook_service.rb:73:in `make_request'
app/services/web_hook_service.rb:26:in `execute'
app/models/hooks/web_hook.rb:10:in `execute'
app/services/test_hooks/base_service.rb:22:in `block in execute'
app/services/test_hooks/base_service.rb:19:in `catch'
app/services/test_hooks/base_service.rb:19:in `execute'
app/controllers/projects/hooks_controller.rb:41:in `test'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:334:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
ee/lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
While I easily fixed the problem by enabling the below in admin settings, GitLab should show a friendly error message instead of error 500.
(Somewhat) related:
Edited by Damian Nowak