From 784d54b7e13a96b4aa7e342db20244a7fa151674 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 18 Apr 2024 21:39:02 +0530 Subject: [PATCH] feat(engine): remove proxy --- scraper/src/main.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scraper/src/main.js b/scraper/src/main.js index 78537eef..626bb237 100644 --- a/scraper/src/main.js +++ b/scraper/src/main.js @@ -16,18 +16,6 @@ fastify.get('/', async (request, reply) => { reply.send('Welcome to the Playwright Scraper API'); }); -fastify.get('/proxy', async (request, reply) => { - const { url } = request.query; - - try { - const response = await fetch(url); - const html = await response.text(); - reply.type('text/html').send(html); - } catch (error) { - reply.status(500).send(`Error fetching website: ${error.message}`); - } -}); - await fastify.listen(3000, (err, address) => { if (err) throw err; console.log(`Server listening on ${fastify.server.address().port}`)