nginx: only log if a cookie is sent
This commit is contained in:
parent
9316ab1a80
commit
3f755b9f24
|
@ -26,9 +26,13 @@ http {
|
|||
gzip_static on;
|
||||
|
||||
# Logging
|
||||
map $http_cookie $loggable {
|
||||
"" 0;
|
||||
default 1;
|
||||
}
|
||||
log_format niver '|$time_local| [$remote_addr]@$server_name {$ssl_protocol $ssl_cipher} $status $body_bytes_sent "$request" "$http_user_agent"';
|
||||
access_log /var/log/nginx/access.log niver;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
access_log /var/log/nginx/access.log niver if=$loggable;
|
||||
|
||||
# Disable useless/dangerous features
|
||||
etag off;
|
||||
|
|
Loading…
Reference in New Issue