How to allow internal requests for webhooks

I have been using internal Webhooks for a while, but have suddenly stopped working and produce the error when trying to test the webhook:

URI::InvalidURIError (URI::InvalidURIError):
  lib/gitlab/proxy_http_connection_adapter.rb:14:in `connection'

It seems to be throwing the error because allow_local_requests returns false in lib/gitlab/proxy_http_connection_adapter.rb:

module Gitlab
  class ProxyHTTPConnectionAdapter < HTTParty::ConnectionAdapter
    def connection
      if !allow_local_requests? && blocked_url?
        raise URI::InvalidURIError
      end

      super
    end

    private

    def blocked_url?
      Gitlab::UrlBlocker.blocked_url?(uri, allow_private_networks: false)
    end

    def allow_local_requests?
      options.fetch(:allow_local_requests, allow_settings_local_requests?)
    end

    def allow_settings_local_requests?
      Gitlab::CurrentSettings.allow_local_requests_from_hooks_and_services?
    end
  end
end

I was unable to find any documentation on how to overwrite this setting - Is there a way?