diff --git a/redash/query_runner/__init__.py b/redash/query_runner/__init__.py index d5f4f1c930..9f92ffe637 100644 --- a/redash/query_runner/__init__.py +++ b/redash/query_runner/__init__.py @@ -258,7 +258,7 @@ def get_auth(self): return None def get_response(self, url, auth=None, http_method="get", **kwargs): - if is_private_address(url): + if is_private_address(url) and settings.ENFORCE_PRIVATE_ADDRESS_BLOCK: raise Exception("Can't query private addresses.") # Get authentication values if not given