You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/02/26 15:14:41 UTC

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1167: feature: auto import nameservers into APISIX from system resolv file.…

membphis commented on a change in pull request #1167: feature: auto import nameservers into APISIX from system resolv file.…
URL: https://github.com/apache/incubator-apisix/pull/1167#discussion_r384554864
 
 

 ##########
 File path: bin/apisix
 ##########
 @@ -236,7 +236,12 @@ http {
     init_by_lua_block {
         require "resty.core"
         apisix = require("apisix")
-        apisix.http_init()
+        local args = {}
+
+        local dns_resolver = { {% for _, dns_addr in ipairs(dns_resolver or {}) do %} "{*dns_addr*}", {% end %} }
+        args["dns_resolver"] = dns_resolver
 
 Review comment:
   this style is better.
   
   ```
   local args = {
       dns_resolver = dns_resolver
   }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services