Fix: Infrastructure disks overflow

This commit is contained in:
Br0wnHammer committed 2025-07-23 15:33:09 +05:30
1 parent 9c9eaca990
commit 8fcaf721ad
4 files changed
+13 -12

No files matched your search

+2 -7
View File
@@ -164,11 +164,7 @@ const createMonitorBodyValidation = joi.object({
.custom((value, helpers) => {
// 1. Standard URLs: must have protocol and pass canParse()
if (/^(https?:\/\/)/.test(value)) {
if (
typeof URL !== "undefined" &&
typeof URL.canParse === "function" &&
URL.canParse(value)
) {
if (typeof URL !== "undefined" && typeof URL.canParse === "function" && URL.canParse(value)) {
return value;
}
// else, it's a malformed URL with protocol
@@ -197,8 +193,7 @@ const createMonitorBodyValidation = joi.object({
.messages({
"string.empty": "This field is required.",
"string.uri": "The URL you provided is not valid.",
"string.invalidUrl":
"Please enter a valid URL, hostname, or container name (with optional port).",
"string.invalidUrl": "Please enter a valid URL, hostname, or container name (with optional port).",
}),
ignoreTlsErrors: joi.boolean().default(false),
port: joi.number(),