qiujiayu commented on a change in pull request #1217: enable local DNS
URL: https://github.com/apache/incubator-apisix/pull/1217#discussion_r391981868
##########
File path: bin/apisix
##########
@@ -609,6 +632,22 @@ local function init()
sys_conf["worker_processes"] = "auto"
end
+ if sys_conf["enable_local_dns"] == true then
+ local dns_addrs, err = local_dns_resolver("/etc/resolv.conf")
+ if not dns_addrs then
+ error("failed to import local DNS: " .. err)
+ end
+
+ local dns_resolver = sys_conf["dns_resolver"]
+ if dns_resolver then
+ for _, addr in ipairs(dns_addrs) do
+ table.insert(dns_resolver, addr)
Review comment:
the `dns_resolver` used in `ngx_tpl`,
https://github.com/apache/incubator-apisix/pull/1217/files/ceee77794539d2b3dee3e90d41096aed2d976b51#diff-62edadffc237f13dc28a694080d293a8R120
https://github.com/apache/incubator-apisix/pull/1217/files/ceee77794539d2b3dee3e90d41096aed2d976b51#diff-62edadffc237f13dc28a694080d293a8R249
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services