Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(api): remove query parameter sanitization that was breaking extracts (#1661)

Gergő Móricz89e42b11371e
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 8399cdef5..51e6d3371 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -42,14 +42,15 @@ export const url = z.preprocess(
x = `http://${x}`;
}
- try {
- const urlObj = new URL(x as string);
- if (urlObj.search) {
- const searchParams = new URLSearchParams(urlObj.search.substring(1));
- return `${urlObj.origin}${urlObj.pathname}?${searchParams.toString()}`;
- }
- } catch (e) {
- }
+ // transforming the query parameters is breaking certain sites, so we're not doing it - mogery
+ // try {
+ // const urlObj = new URL(x as string);
+ // if (urlObj.search) {
+ // const searchParams = new URLSearchParams(urlObj.search.substring(1));
+ // return `${urlObj.origin}${urlObj.pathname}?${searchParams.toString()}`;
+ // }
+ // } catch (e) {
+ // }
return x;
},