Try to fix things again.
This commit is contained in:
parent
3745fd9218
commit
450b22ccf7
6
index.ts
6
index.ts
@ -44,8 +44,10 @@ let srv = net.createServer(function(socket: net.Socket) {
|
||||
if (addr == "127.0.0.1") {
|
||||
let p = pp.V1ProxyProtocol.parse(String(data));
|
||||
addr = p.source.ipAddress;
|
||||
if (typeof p.data === 'string') {
|
||||
data = p.data;
|
||||
if (typeof p.data === 'undefined') {
|
||||
return;
|
||||
} else {
|
||||
data = data.slice(p.data.length);
|
||||
}
|
||||
} else {
|
||||
console.log("Address " + addr + " tried to use proxy protocol.");
|
||||
|
Loading…
Reference in New Issue
Block a user