fix(tests): serve.mjs post-bind wildcard check reads the 'IPv6' family of server.address(); report-compare checks the type before opening (a FIFO or device is never opened) and again on the handle
This commit is contained in:
1 parent
d7d99b4766
commit
854d988c07
2 files changed
+18
-9
No files matched your search
@@ -36,8 +36,12 @@ const WILDCARDS = new BlockList()
|
||||
WILDCARDS.addAddress('0.0.0.0', 'ipv4')
|
||||
WILDCARDS.addAddress('::', 'ipv6')
|
||||
|
||||
// `dns.lookup` reports the family as 6, `server.address()` as 'IPv6'.
|
||||
const isWildcard = ({ address, family }) =>
|
||||
WILDCARDS.check(address.replace(/%.*$/, ''), family === 6 ? 'ipv6' : 'ipv4')
|
||||
WILDCARDS.check(
|
||||
address.replace(/%.*$/, ''),
|
||||
family === 6 || family === 'IPv6' ? 'ipv6' : 'ipv4',
|
||||
)
|
||||
|
||||
/**
|
||||
* The one address `host` names, resolved before any socket exists: an empty
|
||||
|
||||
Reference in new issue
Block a user