diff --git a/microservices/gatewayApi/v1/routes/gateway.py b/microservices/gatewayApi/v1/routes/gateway.py index 2a5932a..ba94ad5 100644 --- a/microservices/gatewayApi/v1/routes/gateway.py +++ b/microservices/gatewayApi/v1/routes/gateway.py @@ -272,9 +272,8 @@ def write_config(namespace: str) -> object: protected_kube_namespaces = json.loads(app.config['protectedKubeNamespaces']) dp = get_data_plane(ns_attributes) - do_validate_upstreams = app.config['data_planes'][dp]["validate-upstreams"] - if do_validate_upstreams is None: - do_validate_upstreams = False + + do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams", False) log.debug("Validate upstreams %s %s" % (dp, do_validate_upstreams)) diff --git a/microservices/gatewayApi/v2/routes/gateway.py b/microservices/gatewayApi/v2/routes/gateway.py index 2ed0b40..702216c 100644 --- a/microservices/gatewayApi/v2/routes/gateway.py +++ b/microservices/gatewayApi/v2/routes/gateway.py @@ -268,9 +268,7 @@ def write_config(namespace: str) -> object: try: protected_kube_namespaces = json.loads(app.config['protectedKubeNamespaces']) - do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams") - if do_validate_upstreams is None: - do_validate_upstreams = False + do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams", False) log.debug("Validate upstreams %s %s" % (dp, do_validate_upstreams)) validate_upstream(gw_config, ns_attributes, protected_kube_namespaces, do_validate_upstreams)