Description
The proxy-mirror doesn't support brighter DNS resolution, as its feature is currently based on Nginx's directive, which uses Nginx's own DNS resolution.
As Nginx's own DNS resolution doesn't support modern DNS features, this brings some inconvenience, especially under k8s.
To solve the problem, we need to resolve the host ourselves, and pass the result to the Nginx variable upstream_mirror_uri.
|
ctx.var.upstream_mirror_uri = |
|
conf.host .. (conf.path or ctx.var.uri) .. ctx.var.is_args .. (ctx.var.args or '') |
|
|
We can use the method below to resolve the host:
|
function _M.parse_domain(host) |
Description
The proxy-mirror doesn't support brighter DNS resolution, as its feature is currently based on Nginx's directive, which uses Nginx's own DNS resolution.
As Nginx's own DNS resolution doesn't support modern DNS features, this brings some inconvenience, especially under k8s.
To solve the problem, we need to resolve the host ourselves, and pass the result to the Nginx variable
upstream_mirror_uri.apisix/apisix/plugins/proxy-mirror.lua
Lines 63 to 65 in 3c07574
We can use the method below to resolve the host:
apisix/apisix/core/resolver.lua
Line 44 in 3c07574