diff --git a/server/util-server.js b/server/util-server.js
index a602f3ad9..5abfd5e9e 100644
--- a/server/util-server.js
+++ b/server/util-server.js
@@ -332,6 +332,7 @@ exports.dnsResolve = function (hostname, resolverServer, resolverPort, rrtype, t
});
break;
case "DOH":
+ dohQuery = dohQuery || "dns-query?dns={query}";
resolver = DOHClient({
dns: `https://${resolverServer}:${resolverPort}/${dohQuery}`,
});
diff --git a/src/lang/en.json b/src/lang/en.json
index 9a3a5465d..eb39081df 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -575,7 +575,7 @@
"resolverserverDescription": "Cloudflare is the default server. You can change the resolver server anytime.",
"rrtypeDescription": "Select the RR type you want to monitor",
"dnsTransportDescription": "Select the transport method for querying the DNS server.",
- "dohQueryPathDescription": "Set the query path to use for DNS wireformat. Must contain \"{query}\".",
+ "dohQueryPathDescription": "Set the query path to use for DNS wireformat. Must contain",
"pauseMonitorMsg": "Are you sure want to pause?",
"enableDefaultNotificationDescription": "This notification will be enabled by default for new monitors. You can still disable the notification separately for each monitor.",
"clearEventsMsg": "Are you sure want to delete all events for this monitor?",
diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue
index 1c87d12bd..352045921 100644
--- a/src/pages/EditMonitor.vue
+++ b/src/pages/EditMonitor.vue
@@ -289,7 +289,11 @@
v-model="monitor.hostname"
type="text"
class="form-control"
- :pattern="`${monitor.type === 'mqtt' ? mqttIpOrHostnameRegexPattern : ipOrHostnameRegexPattern}`"
+ :pattern="`${
+ monitor.type === 'mqtt' ? mqttIpOrHostnameRegexPattern :
+ monitor.type === 'dns' ? ipOrDnsNameRegexPattern :
+ ipOrHostnameRegexPattern
+ }`"
required
data-testid="hostname-input"
>
@@ -373,17 +377,19 @@
-