fix(url validation): sub paths
This commit is contained in:
parent
0bbb8bb24e
commit
f2f6f78dcf
|
@ -27,7 +27,10 @@ const url = z.preprocess(
|
|||
.string()
|
||||
.url()
|
||||
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
||||
.regex(/\.[a-z]{2,}$/i, "URL must have a valid top-level domain")
|
||||
.refine(
|
||||
(x) => /\.[a-z]{2,}(\/|$)/i.test(x),
|
||||
"URL must have a valid top-level domain or be a valid path"
|
||||
)
|
||||
.refine(
|
||||
(x) => !isUrlBlocked(x),
|
||||
"Firecrawl currently does not support social media scraping due to policy restrictions. We're actively working on building support for it."
|
||||
|
|
Loading…
Reference in New Issue