Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Masking query string password in access log

$
0
0
location /xxx {
#Strip password in access.log
set $temp $request;
if ($temp ~ (.*)password=[^&]*(.*)) {
set $temp $1password=****$2;
}
log_format filter '$remote_addr - $remote_user [$time_local] '
'"$temp" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log logs/access.log filter;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>