Skip to content

Commit

Permalink
Fix style error
Browse files Browse the repository at this point in the history
  • Loading branch information
K4rakara committed Nov 21, 2024
1 parent 1758f29 commit 23c4aa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/backend/src/core/HttpRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ class HttpRequestServiceAgent extends http.Agent {
}
});
return socket;
};
}

@bindThis
private isPrivateIp(ip: string): boolean {
const parsedIp = ipaddr.parse(ip);

for (const net of this.config.allowedPrivateNetworks ?? []) {
const cidr = ipaddr.parseCIDR(net);
if (cidr[0].kind() === parsedIp.kind() && parsedIp.match(ipaddr.parseCIDR(net))) {
return false;
}
}

return parsedIp.range() !== 'unicast';
}
}
Expand Down Expand Up @@ -98,14 +98,14 @@ class HttpsRequestServiceAgent extends https.Agent {
@bindThis
private isPrivateIp(ip: string): boolean {
const parsedIp = ipaddr.parse(ip);

for (const net of this.config.allowedPrivateNetworks ?? []) {
const cidr = ipaddr.parseCIDR(net);
if (cidr[0].kind() === parsedIp.kind() && parsedIp.match(ipaddr.parseCIDR(net))) {
return false;
}
}

return parsedIp.range() !== 'unicast';
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ export class InboxProcessorService implements OnApplicationShutdown {
if (signerHost !== activityIdHost) {
throw new Bull.UnrecoverableError(`skip: signerHost(${signerHost}) !== activity.id host(${activityIdHost}`);
}
}
else {
} else {
throw new Bull.UnrecoverableError('skip: activity id is not a string');
}

Expand Down

0 comments on commit 23c4aa2

Please sign in to comment.