added: config parameters:
bool log_check_proxy_ip_header; // check whether there is a 'log_proxy_ip_header' header // and if so then log the IP address from it // default: false std::wstring log_proxy_ip_header; // proxy header representing the real IP address of a client // default: X-Real-IP git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1104 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -936,8 +936,14 @@ void App::LogAccess()
|
||||
log << log1;
|
||||
log.PrintDate(cur.request->start_date, config.log_time_zone_id);
|
||||
|
||||
log << ' ';
|
||||
|
||||
if( config.log_check_proxy_ip_header )
|
||||
log << cur.request->headers_in.Text(config.log_proxy_ip_header, L"no-log_proxy_ip_header");
|
||||
else
|
||||
log << cur.request->env_remote_addr;
|
||||
|
||||
log << ' '
|
||||
<< cur.request->env_remote_addr << ' '
|
||||
<< cur.request->env_request_method << ' '
|
||||
<< cur.request->env_http_host
|
||||
<< cur.request->env_request_uri << ' '
|
||||
|
Reference in New Issue
Block a user