Use an array to store upstream server IPs

This will avoid overwritting the IP when more than one upstream DNS server uses the same name

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign
2025-09-15 22:19:09 -03:00
parent 52441b7b1b
commit 48666e1ffd
2 changed files with 5 additions and 8 deletions

View File

@@ -5,7 +5,7 @@
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
/* global upstreams:false */
/* global upstreamIPs:false */
"use strict";
@@ -98,7 +98,7 @@ globalThis.htmlLegendPlugin = {
link.href = `queries?type=${item.text}`;
} else {
// Encode the forward destination as it may contain an "#" character
link.href = `queries?upstream=${encodeURIComponent(upstreams[item.text])}`;
link.href = `queries?upstream=${encodeURIComponent(upstreamIPs[item.index])}`;
}
} else {
// no clickable links in other charts