Skip to content

Commit

Permalink
Update config expression
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaiyarasiganeshalingam committed Nov 19, 2024
1 parent cc06c27 commit 4d2e316
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4d2e316

Please sign in to comment.