Nick:
This commit is contained in:
@@ -28,6 +28,7 @@ export async function mapController(
|
|||||||
|
|
||||||
req.body = mapRequestSchema.parse(req.body);
|
req.body = mapRequestSchema.parse(req.body);
|
||||||
|
|
||||||
|
|
||||||
const limit = req.body.limit;
|
const limit = req.body.limit;
|
||||||
const id = uuidv4();
|
const id = uuidv4();
|
||||||
let links: string[] = [req.body.url];
|
let links: string[] = [req.body.url];
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const url = z.preprocess(
|
|||||||
.string()
|
.string()
|
||||||
.url()
|
.url()
|
||||||
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
||||||
|
.regex(/\.[a-z]{2,}$/i, "URL must have a valid top-level domain")
|
||||||
.refine(
|
.refine(
|
||||||
(x) => !isUrlBlocked(x),
|
(x) => !isUrlBlocked(x),
|
||||||
"Firecrawl currently does not support social media scraping due to policy restrictions. We're actively working on building support for it."
|
"Firecrawl currently does not support social media scraping due to policy restrictions. We're actively working on building support for it."
|
||||||
@@ -121,7 +122,7 @@ export const mapRequestSchema = crawlerOptions.extend({
|
|||||||
includeSubdomains: z.boolean().default(true),
|
includeSubdomains: z.boolean().default(true),
|
||||||
search: z.string().optional(),
|
search: z.string().optional(),
|
||||||
ignoreSitemap: z.boolean().default(false),
|
ignoreSitemap: z.boolean().default(false),
|
||||||
limit: z.number().min(1).max(50).default(5000),
|
limit: z.number().min(1).max(50).default(5000).optional(),
|
||||||
}).strict(strictMessage);
|
}).strict(strictMessage);
|
||||||
|
|
||||||
// export type MapRequest = {
|
// export type MapRequest = {
|
||||||
|
|||||||
Reference in New Issue
Block a user