Fix usercounter behind cloudflare

This commit is contained in:
Ajay
2024-02-27 03:33:38 -05:00
parent aec2aa4457
commit 9bcceb7e5b
2 changed files with 6 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ export function userCounter(req: Request, res: Response, next: NextFunction): vo
if (Math.random() < 1 / config.userCounterRatio) {
axios({
method: "post",
url: `${config.userCounterURL}/api/v1/addIP?hashedIP=${getIP(req)}`,
url: `${config.userCounterURL}/api/v1/addIP?hashedIP=${getIP(req, true)}`,
httpAgent
}).catch(() => /* instanbul skip next */ Logger.debug(`Failing to connect to user counter at: ${config.userCounterURL}`));
}