From 9a6f3a1b394bede71c872b15ab9ca24df4c95643 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 1 Oct 2024 15:28:37 +0530 Subject: [PATCH] feat: post config route --- server/src/routes/proxy.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/src/routes/proxy.ts diff --git a/server/src/routes/proxy.ts b/server/src/routes/proxy.ts new file mode 100644 index 00000000..2f130bb9 --- /dev/null +++ b/server/src/routes/proxy.ts @@ -0,0 +1,14 @@ +import { Router, Request, Response } from 'express'; +export const router = Router(); + +router.post('/config', async (req: Request, res: Response) => { + const { proxyConfig } = req.body; + try { + if (!proxyConfig) { + return res.status(400).send('Proxy configuration is required'); + } + console.log(proxyConfig); + } catch (error: any) { + res.status(500).send(`Could not send proxy configuration - ${error.message}`) + } +}) \ No newline at end of file