You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2026/04/03 09:05:18 UTC
(camel) branch main updated: Add inbound header filtering to CXF and Knative filter strategies
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 3f020274a631 Add inbound header filtering to CXF and Knative filter strategies
3f020274a631 is described below
commit 3f020274a6315114e5cc42e292d871ce764b31db
Author: Croway <fe...@gmail.com>
AuthorDate: Thu Apr 2 17:44:48 2026 +0200
Add inbound header filtering to CXF and Knative filter strategies
Align CxfRsHeaderFilterStrategy, CxfHeaderFilterStrategy and
KnativeHttpHeaderFilterStrategy with HttpHeaderFilterStrategy by
adding setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH) so that
internal headers are filtered in both directions.
---
.../org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java | 1 +
.../camel/component/cxf/transport/header/CxfHeaderFilterStrategy.java | 1 +
.../camel/component/knative/http/KnativeHttpHeaderFilterStrategy.java | 1 +
3 files changed, 3 insertions(+)
diff --git a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
index 51c8e184d368..422e1d3144bc 100644
--- a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
+++ b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsHeaderFilterStrategy.java
@@ -35,6 +35,7 @@ public class CxfRsHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
// filter headers begin with "Camel" or "org.apache.camel"
setOutFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
+ setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
}
diff --git a/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/header/CxfHeaderFilterStrategy.java b/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/header/CxfHeaderFilterStrategy.java
index 538e14dc584f..921c45f94b5f 100644
--- a/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/header/CxfHeaderFilterStrategy.java
+++ b/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/header/CxfHeaderFilterStrategy.java
@@ -97,6 +97,7 @@ public class CxfHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
// filter headers begin with "Camel" or "org.apache.camel"
setOutFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
+ setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
}
@SuppressWarnings("unchecked")
diff --git a/components/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpHeaderFilterStrategy.java b/components/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpHeaderFilterStrategy.java
index 342c371741fa..2e54bd56b435 100644
--- a/components/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpHeaderFilterStrategy.java
+++ b/components/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpHeaderFilterStrategy.java
@@ -32,5 +32,6 @@ public class KnativeHttpHeaderFilterStrategy extends DefaultHeaderFilterStrategy
// filter headers begin with "Camel" or "org.apache.camel"
// must ignore case for Http based transports
setOutFilterPattern("(?i)(Camel|org\\.apache\\.camel)[\\.|a-z|A-z|0-9]*");
+ setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH);
}
}