From 4d2e31605a3f2cf8663575e1a37d84bdccafcab3 Mon Sep 17 00:00:00 2001 From: Kalaiyarasiganeshalingam Date: Tue, 19 Nov 2024 12:56:38 +0530 Subject: [PATCH] Update config expression --- .../expression/ast/HeadersAndPropertiesAccessNode.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/core/src/main/java/org/apache/synapse/util/synapse/expression/ast/HeadersAndPropertiesAccessNode.java b/modules/core/src/main/java/org/apache/synapse/util/synapse/expression/ast/HeadersAndPropertiesAccessNode.java index 31af957dfc..1ba97c73d2 100644 --- a/modules/core/src/main/java/org/apache/synapse/util/synapse/expression/ast/HeadersAndPropertiesAccessNode.java +++ b/modules/core/src/main/java/org/apache/synapse/util/synapse/expression/ast/HeadersAndPropertiesAccessNode.java @@ -19,6 +19,8 @@ package org.apache.synapse.util.synapse.expression.ast; import org.apache.synapse.SynapseConstants; +import org.apache.synapse.commons.property.PropertyHolder; +import org.apache.synapse.commons.resolvers.ConfigResolver; import org.apache.synapse.util.synapse.expression.context.EvaluationContext; import org.apache.synapse.util.synapse.expression.exception.EvaluationException; @@ -60,6 +62,8 @@ public ExpressionResult evaluate(EvaluationContext context) { Object value; if (Type.HEADER.equals(type)) { value = context.getHeader(name); + } else if (Type.CONFIG.equals(type)) { + value = PropertyHolder.getInstance().getPropertyValue(name); } else { if (SynapseConstants.URI_PARAM.equals(scope)) { value = context.getProperty("uri.var." + name, SynapseConstants.SYNAPSE);