Fixed issue with lookup

This commit is contained in:
2026-07-10 00:35:50 -04:00
parent 1295d4f5ce
commit 99cdbe6586
2 changed files with 20 additions and 5 deletions
+8
View File
@@ -35,6 +35,14 @@ const socket = new SocketServerJson({
// If we don't have a match, return empty object
if(!parentHost) return clientSocket.write(JSON.stringify({}));
// lookUp returns the live #record object stored inside the shared
// lookup tree. Everything below mutates parentHost (sets
// wildcard_parent, stringifies every value), so work on a shallow
// copy — mutating the shared node would corrupt the tree, e.g. turn
// wildcard_matchAny into the string "false" (truthy) and break the
// matchAny guard on subsequent lookups.
parentHost = {...parentHost};
// A wildcard host with matchAny disabled only serves subdomains that
// are explicitly defined in redis. Reaching this service means redis
// had no direct entry for the requested domain, so an inexact match