summary refs log tree commit diff
path: root/src/routes
diff options
context:
space:
mode:
authorDiego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com>2021-07-19 13:17:33 -0500
committerDiego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com>2021-07-19 13:17:33 -0500
commit7dab8f9435792c62f8e1e2b4d403f3ab71e8b2f1 (patch)
tree471ac0e1915c61a9f59b226e326884784275d822 /src/routes
parentMerge pull request #172 from fosscord/l10n_master (diff)
downloadserver-7dab8f9435792c62f8e1e2b4d403f3ab71e8b2f1.tar.xz
[Gateway Endpoint] Encode response as JSON
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/gateway.ts3
1 files changed, 2 insertions, 1 deletions
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;