From 7dab8f9435792c62f8e1e2b4d403f3ab71e8b2f1 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com> Date: Mon, 19 Jul 2021 13:17:33 -0500 Subject: [PATCH] [Gateway Endpoint] Encode response as JSON --- src/routes/gateway.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/gateway.ts b/src/routes/gateway.ts index 7e8146df..2ddd06d8 100644 --- a/src/routes/gateway.ts +++ b/src/routes/gateway.ts @@ -5,7 +5,8 @@ const router = Router(); router.get("/", (req: Request, res: Response) => { const { endpoint } = Config.get().gateway; - res.send({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" }); + res.setHeader('Content-Type', 'application/json'); + res.send(JSON.stringify({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" })); }); export default router;