You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Piyush Sharma <pi...@gmail.com> on 2024/05/02 05:15:43 UTC
missing headers
Hi,
How to forward custom headers from frontend tomcat to backend tomcat witn
mod_jk?
*Scenario :*
1. APP1 : Apache (mod_jk) + Tomcat
2. APP2 : Apache (mod_jk) + Tomcat
Now, when a user accesses APP1 it add fews headers via SSO app user details
etc..
I can see in Tomcat logs as by adding filters. Now when the request goes to
APP2 (backend Tomcat via Apache), it drops those custom headers. I came to
know that *mod_jk does not use the http protocol to talk to the tomcat
server.* Is there any way to forward all the custom headers from frontend
application to backend applications.
https://stackoverflow.com/questions/18998715/http-response-header-not-coming-with-apache-tomcat-connection-using-mod-jk
Thanks
Re: missing headers
Posted by Mark Thomas <ma...@apache.org>.
On 02/05/2024 06:15, Piyush Sharma wrote:
> Hi,
>
> How to forward custom headers from frontend tomcat to backend tomcat witn
> mod_jk?
When using mod_jk the front end is always httpd, not Tomcat.
You don't need to do anything. mod_jk passes all the http headers it
receives.
> *Scenario :*
>
> 1. APP1 : Apache (mod_jk) + Tomcat
> 2. APP2 : Apache (mod_jk) + Tomcat
>
> Now, when a user accesses APP1 it add fews headers via SSO app user details
> etc..
> I can see in Tomcat logs as by adding filters. Now when the request goes to
> APP2 (backend Tomcat via Apache), it drops those custom headers.
That sounds like a client issue. Client sends request to app1 and
receives some custom headers. If you want those headers sent to app2
then that is a client issue, not a Tomcat issue.
> I came to
> know that *mod_jk does not use the http protocol to talk to the tomcat
> server.* Is there any way to forward all the custom headers from frontend
> application to backend applications.
This already happens.
> https://stackoverflow.com/questions/18998715/http-response-header-not-coming-with-apache-tomcat-connection-using-mod-jk
There is a fair amount of nonsense in both the question and some of the
responses.
It would be a lot easier to help you if you provided a lot more
information. For example:
- httpd version
- tomcat version
- mod_jk version
- httpd configuration
- tomcat configuration
- mod_jk configuration
- sample request as sent by the client
- sample request as received by Tomcat
- sample response as sent by Tomcat
- sample response as received by the client
- the previous 4 to be provided both by going via the reverse proxy and
by going directly to Tomcat
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org