mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 00:46:50 +00:00
Update configs for active hosts only on ddns update
Other changes: - Fixed null property read error on clients (when switching to public access) - Use separate `resolvedAddress` field for resolved IP instead of overwriting address - Reduced ddns log verbosity
This commit is contained in:
@ -139,12 +139,13 @@ const internalNginx = {
|
||||
*/
|
||||
resolveDDNSAddresses: (host) => {
|
||||
const promises = [];
|
||||
if (typeof host.access_list !== 'undefined' && typeof host.access_list.clients !== 'undefined') {
|
||||
if (typeof host.access_list !== 'undefined' && host.access_list && typeof host.access_list.clients !== 'undefined' && host.access_list.clients) {
|
||||
for (const client of host.access_list.clients) {
|
||||
if (ddnsResolver.requiresResolution(client.address)) {
|
||||
const p = ddnsResolver.resolveAddress(client.address)
|
||||
const address = client.address;
|
||||
if (ddnsResolver.requiresResolution(address)) {
|
||||
const p = ddnsResolver.resolveAddress(address)
|
||||
.then((resolvedIP) => {
|
||||
client.address = `${resolvedIP}; # ${client.address}`;
|
||||
Object.defineProperty(client, 'resolvedAddress', {value: resolvedIP});
|
||||
return Promise.resolve();
|
||||
});
|
||||
promises.push(p);
|
||||
|
Reference in New Issue
Block a user