Skip to content

Commit

Permalink
fix it here too
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Jan 27, 2025
1 parent 0356537 commit ac0710e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/apikey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const verifyApiKey = async (req: MineSkinV2Request, res: Response) => {
// Either a server IP or a client origin, not both
if (key.allowedIps && key.allowedIps.length > 0) {
const ip = getIp(req);
if (!ip || key.allowedIps.includes(ip.trim())) {
if (!ip || !key.allowedIps.includes(ip.trim())) {
console.log(debug(`Client ${ ip } not allowed`));
throw new MineSkinError("invalid_api_key", "Client not allowed", {httpCode: 403});
}
Expand Down

0 comments on commit ac0710e

Please sign in to comment.