W
W
wini6662021-05-26 10:22:37
JavaScript
wini666, 2021-05-26 10:22:37

Why does dns.reverse return all hostnames except the very first one?

/etc/hosts
172.27.0.8 mytest1.com mytest2.com mytest3.com

js dns.reverse will only return ["mytest2.com", "mytest3.com"] without "mytest1.com", why???
const hostnames = await dns.reverse("172.27.0.8");

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Arman, 2019-01-05
@MaksPaverov

although it is declared global

it's not like this
Globally like this:
var check;
$('.buy').click(function(){
    var price = $(this).data('price'),
        product = $(this).data('product'),
        photo = $(this).data('photo'),
        vibor = $(this).data('kavo');

        check = '123',
//...
});

A
Alexander Kositsyn, 2019-01-05
@alex_keysi

Сохраняйте в buy это значение. Для этого есть dataset. Не используйте такие сайдэффекты. Потом не понятно будет откуда тянется check

R
Ruslan Fedoseev, 2021-05-26
@wini666

because you need to carefully read the format of the /etc/hosts file
, the short name comes first after the address, and then the full domains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question