Update validate.ts

This commit is contained in:
Jonathan Summers-Muir committed 2022-05-02 17:57:59 +08:00
1 parent 84f7b12725
commit a7cf144052
1 file changed
+6
@@ -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 })