Allow only https

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-13 15:54:05 +01:00
parent c163ca9bf0
commit c81205aaa1
3 changed files with 8 additions and 5 deletions

View File

@@ -163,12 +163,12 @@ const webhookFormSchema = z.object({
(val) => {
try {
const url = new URL(val);
return url.protocol === "http:" || url.protocol === "https:";
return url.protocol === "https:";
} catch {
return false;
}
},
"URL must use http:// or https://",
"URL must use https://",
),
selectedEvents: z
.array(z.enum(WEBHOOK_EVENT_VALUES))