Addendum :
On 13.03.2019 12:03, André Warnier (tomcat) wrote:
On 13.03.2019 11:44, Jäkel, Guido wrote:
Dear Thomas,
you may include a filter servlet into the application to modify the response
header. A
quick search offers e.g. https://gist.github.com/danlangford/3669475 , which
states to
implement a generic, configurable Response Header Filter.
The OP wants to insert a *Request* header, not a Response header.
As I recall, that is a bit more complicated, because under Tomcat the Request is
immutable, so you have to subclass it, and add the header dynamically when the application
issues a request.getHeaders call or so.
You may compile this servlet independent from an existing application,
therefore you may
tweak even existing WARs with this.
Just a note : "add a header .. to all requests coming from a given connector"
Does the servlet filter know what the Connector was, through which the request
was
received ? And even if so, the filter would still need some configuration, in
order to do
that only for the Connector in question.
(A httpd front-end would know, because it would be the one forwarding to that
Connector
specifically)
Guido
-----Original Message-----
From: Thomas Meyer [mailto:tho...@m3y3r.de]
Sent: Wednesday, March 13, 2019 10:43 AM
To: users@tomcat.apache.org
Subject: How to add an header field to all requests unconditionally
Hi,
what would be the easiest way to uncoditionally add an header field to
all requests coming from a given connector?
I searched the provided Valves but there seems to be no support for my
requirment.
with kind regards
thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org