1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-21 18:21:36 +02:00

[Gateway Endpoint] Encode response as JSON

This commit is contained in:
Diego Magdaleno 2021-07-19 13:17:33 -05:00
parent 05cff32522
commit 7dab8f9435

View File

@ -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;