mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Added nullguard when req.socket.remoteAddress
is null inside handleRequest()
This commit is contained in:
parent
ad54e7ae98
commit
10b1b2b3aa
@ -79,7 +79,9 @@ export class HttpServer
|
|||||||
if (this.httpConfig.logRequests)
|
if (this.httpConfig.logRequests)
|
||||||
{
|
{
|
||||||
// TODO: Extend to include 192.168 / 10.10 ranges or check subnet
|
// TODO: Extend to include 192.168 / 10.10 ranges or check subnet
|
||||||
const isLocalRequest = req.socket.remoteAddress.startsWith("127.0.0");
|
const isLocalRequest = req.socket.remoteAddress?.startsWith("127.0.0");
|
||||||
|
if (typeof isLocalRequest !== "undefined")
|
||||||
|
{
|
||||||
if (isLocalRequest)
|
if (isLocalRequest)
|
||||||
{
|
{
|
||||||
this.logger.info(this.localisationService.getText("client_request", req.url));
|
this.logger.info(this.localisationService.getText("client_request", req.url));
|
||||||
@ -92,6 +94,7 @@ export class HttpServer
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const listener of this.httpListeners)
|
for (const listener of this.httpListeners)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user