Require https:// URLs for webhook endpoints

This commit is contained in:
Konstantin Wohlwend 2024-08-31 18:14:36 -07:00
parent 6f830e7275
commit c23b52b8a1

View File

@ -26,7 +26,7 @@ function CreateDialog(props: {
const formSchema = yup.object({
makeSureAlert: yup.mixed().meta({ stackFormFieldRender: () => <Alert> Make sure this is a trusted URL that you control.</Alert> }),
url: urlSchema.required().label("URL (starts with https:// or http://)"),
url: urlSchema.required().label("URL (starts with https://)").test("is-https", "URL must start with https://", (value) => value.startsWith("https://")),
description: yup.string().label("Description"),
});