Select the events that will be sent to this webhook.
-
+
+
)
}
diff --git a/web/utils/urls.ts b/web/utils/urls.ts
new file mode 100644
index 000000000..f5fc6427e
--- /dev/null
+++ b/web/utils/urls.ts
@@ -0,0 +1,10 @@
+// Stolen from https://stackoverflow.com/a/5717133
+export function isValidUrl(url: string): boolean {
+ var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
+ '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
+ '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
+ '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
+ '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
+ '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
+ return !!pattern.test(url);
+}
\ No newline at end of file