Skip to content

Commit

Permalink
Make URL validation stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
krasun committed Sep 1, 2024
1 parent 384221a commit 00cbe51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "screenshotone-validations",
"homepage": "https://screenshotone.com",
"version": "1.0.44",
"version": "1.0.45",
"description": "Validation schemes for the ScreenshotOne API requests.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const screenshotScheme = {

const commonOptionsScheme = Joi.object({
// URL or HTML is required
url: Joi.string().trim().custom(validUri).optional(),
url: Joi.string().custom(validUri).optional(),
html: Joi.string().optional(),
markdown: Joi.string().optional(),

Expand Down Expand Up @@ -480,7 +480,7 @@ const animateScheme = withHtmlOrUrlOrMarkdownRequired

scroll_try_navigate: Joi.boolean().default(false).optional(),
scroll_navigate_after: Joi.number().integer().optional(),
scroll_navigate_to_url: Joi.string().trim().custom(validUri).optional(),
scroll_navigate_to_url: Joi.string().custom(validUri).optional(),
scroll_navigate_link_hints: Joi.array()
.items(Joi.string().trim())
.default(["pricing", "about", "customers"])
Expand Down

0 comments on commit 00cbe51

Please sign in to comment.