Skip to content

Commit

Permalink
misc(lua-resolver) add a comment elaborating on the Lua resolver use-…
Browse files Browse the repository at this point in the history
…case
  • Loading branch information
thibaultcha committed Sep 12, 2023
1 parent 6b17917 commit 1e00a6e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/common/lua/ngx_wasm_lua_resolver.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/**
* DNS resolution for Proxy-Wasm filters running in Kong Gateway.
*
* ngx_wasm_module handles DNS resolution via Nginx's configured `resolver`
* (http{}, wasm{}, or default from ngx_wasm.h). However, Kong Gateway's DNS
* resolution is handled by the Gateway's Lua-land resolver: resty.dns.client.
*
* To ensure DNS resolution consistency between Kong Gateway core/plugins and
* Proxy-Wasm filters, this file leverages our Wasm/Lua bridge to invoke the
* Gateway's Lua-land resolver in lieu of the configured Nginx resolver when
* built against OpenResty and enabled via `proxy_wasm_lua_resolver`.
*/

#ifndef DDEBUG
#define DDEBUG 0
#endif
Expand Down

0 comments on commit 1e00a6e

Please sign in to comment.