You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Georg <ma...@christiangeorg.de> on 2015/12/16 17:56:37 UTC

[users@httpd] Logging an masqueraded header in Apache 2.4

Hi all,


I am looking for a solution to masquerade/anonymize data I am writing to the acccess log on my proxy. For debugging purposes we need to trace data based on the x-auth header. As this header contains critical data I do not want to enable logging of the full header. Instead I am looking for a solution to only log the first X and the last y header. so instead of logging


  ycsfsfdawlkcfawncfewmlcsdfacs


I would like to see something like this

  ycsfsfd###############csdfacs

 or this.

  ycsfsfd..csdfacs

I am using apache 2.4 on centos
Any suggestion?

Thanks

Chris





Re: [users@httpd] Logging an masqueraded header in Apache 2.4

Posted by Rainer Canavan <ra...@sevenval.com>.
2015-12-16 17:56 GMT+01:00 Christian Georg <ma...@christiangeorg.de>:
> Hi all,
>
>
> I am looking for a solution to masquerade/anonymize data I am writing to the
> acccess log on my proxy. For debugging purposes we need to trace data based
> on the x-auth header. As this header contains critical data I do not want to
> enable logging of the full header. Instead I am looking for a solution to
> only log the first X and the last y header. so instead of logging
>
>
>   ycsfsfdawlkcfawncfewmlcsdfacs
>
>
> I would like to see something like this
>
>   ycsfsfd###############csdfacs
>
>  or this.
>
>   ycsfsfd..csdfacs
>
>
> I am using apache 2.4 on centos
> Any suggestion?

setenvif or  a RewriteRule, possibly together with a RewriteCond
should be able to apply a regular expression to the value of a header
and set a new environment variable based on that.

rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org