logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: log specific response header for unset header
Author
vhochstein



Joined: 12 Jan 2018
Posts: 1
Location: Germany, Lutzhorn

PostPosted: Fri 12 Jan '18 13:59    Post subject: log specific response header for unset header Reply with quote

Hi,

I m using Apache 2.4.6 on RedHat Linux, which is in front of a tomcat Application Server via ProxyPass and ProxyPassReverse configuration.

Tomcat is returning a specific header which I would like to log to my accesslog using LogFormat:
LogFormat "%h,USER=%u,%t,METHOD=%m,URI=%U%q,RESPONSE=%>s,SIZE=%B,DURATION=%D,REFERER=%{Referer}i,USERAGENT=%{User-Agent}i,meinHeader=%{X-Specific-Header}ohist" combined

In addition X-Specific-Header must be removed by apache cause information must not be shown in apache response to client. (Header unset X-Specific-Header)

Unfortuently, it seems that unset header process is being done BEFORE access log is written, cause access log always shows an empty value for X-Specific-Header

Any idea how I might be able to log AND to remove Response Header ?

Thanks a lot for your help in advance

--
Volker
Back to top


Reply to topic   Topic: log specific response header for unset header View previous topic :: View next topic
Post new topic   Forum Index -> Apache