diff --git a/modules/utils.js b/modules/utils.js index 09c155a..08d34ba 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -2,7 +2,6 @@ const path = require("node:path") const logger = require("./logger") const crypto = require("node:crypto") const certificatesManager = require("./certificatesManager") -const serverKeys = certificatesManager.getKeys() async function getRegistrationCountryFromIp(ipAddress) { const apiUrl = `https://ip-api.com/json/${ipAddress}?fields=countryCode` @@ -27,6 +26,7 @@ async function getRegistrationCountryFromIp(ipAddress) { } function signProfileData(dataBase64) { + const serverKeys = certificatesManager.getKeys() try { const privateKey = serverKeys.playerCertificateKeys.private const signer = crypto.createSign("SHA1")