feat(engine): remove proxy
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user