Skip to content

Commit

Permalink
fix: correct array indexing in ArNS middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhitt committed Sep 26, 2023
1 parent bc904bb commit 38b27aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/arns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const createArnsMiddleware = ({
next();
return;
}
const arnsSubdomain = req.subdomains[config.ROOT_HOST_SUBDOMAIN_LENGTH - 1];
const arnsSubdomain = req.subdomains[req.subdomains.length - 1];
if (
EXCLUDED_SUBDOMAINS.has(arnsSubdomain) ||
// Avoid collisions with sandbox URLs by ensuring the subdomain length
Expand Down

0 comments on commit 38b27aa

Please sign in to comment.