You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Darius Cooper <da...@gmail.com> on 2019/09/20 00:52:56 UTC

Changing the Default Header Filter Strategy

I know I can set the HeaderFilterStrategy for a particular end-point, but...

How does one override the DefaultHeaderFilterStrategy with a custom
strategy that will apply to all routes?

We are using Camel's Servlet Listener.
Can we supply something in the configuration (documented here) to replace
the DefaultHeaderFilterStrategy with our own class?
https://camel.apache.org/components/2.x/servletlistener.html

AW: Changing the Default Header Filter Strategy

Posted by Da...@dz-privatbank.com.
Hi,


if you don't want to configure every endpoint and can't use the defaultFilterStrategy I assume the best way would be to use your own component/endpoint which is a subclass of the camel-endpoint you currently use and which does what you want.


You can write the component by yourself and in the consumer you can use your filter strategy.

Every endpoint which uses your component would have your implementation by default.


Best regards,

Daniel

________________________________
Von: Darius Cooper <da...@gmail.com>
Gesendet: Freitag, 20. September 2019 14:14:22
An: users@camel.apache.org
Betreff: Re: Changing the Default Header Filter Strategy

To clarify my use-case:

I want to remove the Authorization header across all my "rest()" routes, by
configuring something in a single place. What's the best way to do that?

On Thu, Sep 19, 2019 at 8:52 PM Darius Cooper <da...@gmail.com>
wrote:

> I know I can set the HeaderFilterStrategy for a particular end-point,
> but...
>
> How does one override the DefaultHeaderFilterStrategy with a custom
> strategy that will apply to all routes?
>
> We are using Camel's Servlet Listener.
> Can we supply something in the configuration (documented here) to replace
> the DefaultHeaderFilterStrategy with our own class?
> https://camel.apache.org/components/2.x/servletlistener.html
>

**********************************************************************
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please call or e-mail the sender and delete the message and any attachment from your system. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive later or incomplete, or contain viruses. DZ PRIVATBANK therefore does not accept liability for any errors or omissions in the contents of this message which arises as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes only and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. DZ PRIVATBANK does not warrant that incoming e-mails will be processed within a certain period of time. For security reasons, DZ PRIVATBANK does not accept any instructions that must be in writing (financial transactions, changes of address, etc.) sent by e-mail. If a message is urgent, please contact us by telephone.
**********************************************************************

Re: Changing the Default Header Filter Strategy

Posted by Darius Cooper <da...@gmail.com>.
To clarify my use-case:

I want to remove the Authorization header across all my "rest()" routes, by
configuring something in a single place. What's the best way to do that?

On Thu, Sep 19, 2019 at 8:52 PM Darius Cooper <da...@gmail.com>
wrote:

> I know I can set the HeaderFilterStrategy for a particular end-point,
> but...
>
> How does one override the DefaultHeaderFilterStrategy with a custom
> strategy that will apply to all routes?
>
> We are using Camel's Servlet Listener.
> Can we supply something in the configuration (documented here) to replace
> the DefaultHeaderFilterStrategy with our own class?
> https://camel.apache.org/components/2.x/servletlistener.html
>