You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
575 B

/**
* List of `zeit.world` nameservers
*/
const nameservers = new Set([
'california.zeit.world',
'london.zeit.world',
'newark.zeit.world',
'sydney.zeit.world',
'iowa.zeit.world',
'dallas.zeit.world',
'amsterdam.zeit.world',
'paris.zeit.world',
'frankfurt.zeit.world',
'singapore.zeit.world'
]);
/**
* Given an array of nameservers (ie: as returned
* by `resolveNs` from Node, assert that they're
* zeit.world's.
*/
export default function isZeitWorld (ns) {
return ns.length > 1 && ns.every((host) => {
return nameservers.has(host);
});
}