Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update validate.ts

Jonathan Summers-Muira7cf1440529f
diff --git a/studio/pages/api/pg-meta/[ref]/query/validate.ts b/studio/pages/api/pg-meta/[ref]/query/validate.ts
index 4279f479ce5..824e468fe83 100644
--- a/studio/pages/api/pg-meta/[ref]/query/validate.ts
+++ b/studio/pages/api/pg-meta/[ref]/query/validate.ts
@@ -21,6 +21,12 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {
const { query } = req.body
+
+ req.headers.origin = undefined
+ req.headers.host = undefined
+
+ console.log('req from headers', req)
+
const headers = constructHeaders(req.headers)
const response = await post(`${PG_META_URL}/query/parse`, { query }, { headers })