log proxy params

This commit is contained in:
Andris Reinman 2017-10-12 11:18:10 +03:00
parent 2890e2e34a
commit e87c33dc72
2 changed files with 7 additions and 2 deletions

View file

@ -263,6 +263,10 @@ Wild Duck is able to use Redis Sentinel instead of single Redis master for autom
Redis Sentinel failover does not guarantee consistency. Wild Duck does not store critical information in Redis, so even if some data loss occurs, it should not be noticeable.
### HAProxy
When using Haproxy you can enable PROXY protocol to get correct remote addresses in logs
### Certificates
You can live-reload updated certificates by sending SIGHUP to the master process. This causes application configuration to be re-read from the disk. Reloading only affects only some settings, for example all TLS certificates are loaded and updated. In this case existing processes continue as is, while new ones use the updated certs.

View file

@ -241,10 +241,11 @@ class IMAPServer extends EventEmitter {
proxy: params[1].trim().toLowerCase(),
destination: socket.remoteAddress
},
'[%s] PROXY from %s through %s',
'[%s] PROXY from %s through %s (%s)',
socketOptions.id,
params[1].trim().toLowerCase(),
socket.remoteAddress
socket.remoteAddress,
JSON.stringify(params)
);
socketOptions.remoteAddress = params[1].trim().toLowerCase();
if (params[3]) {