-
Notifications
You must be signed in to change notification settings - Fork 638
Conversation
The Problem is that the systems dns resolver will never resolve domains while developing locally. For example when using Laravel Valet. What do you think @freekmurze ? |
@mpociot I noticed that too 👍 I made an config option for it 😄 |
Wouldn't that DNS lookup block our server? |
It shouldn't since it's using the Reacts Async DNS lookup and also uses the in-memory cache for lookups. But otherwise some other way needs to be devised to get the statistics across since it just silently fails on our production cluster without it 😄 |
I'm ok with adding this to the package. I don't know how, but it would be nice if we could have an automated test for this. Could you also PR that docs (update the config file there) |
Hmm we could test if it resolves not to 127.0.0.1 with that config option set possibly. Although that probably means it has to be extracted out of the command. Then it could be tested if the correct dns resolver is provided. But testing if the resolver actually resolves something seems silly, and making a really advanced testing suite that only works on not 127.0.0.1 to prove the point might be going a bit to far 😂 Open for ideas! |
A small note FYI, we actually support the |
@WyriHaximus interesting... so as long as the entry is in the hosts file it will never even hit the network? Very nice! This will still not allow us to enable it by default because Valet does not write to the hosts file but good to know that adding entries to the hosts file will make sure no network requests are made for DNS resolving when this is enabled. |
@stayallive correct. To be honest I don't have the slightest clue on how Valet sets the DNS for |
@WyriHaximus Valet places a custom configuration, depending on the TLD that you choose inside the @stayallive thanks for the PR! |
Without this the statistics requests will never reach the server if it's not available on 127.0.0.1 directly (think load balanced or distributed services).
Let the system supply a DNS resolver or use Cloudflare's 1.1.1.1 as an default.