diff options
author | Diego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com> | 2021-07-19 13:17:33 -0500 |
---|---|---|
committer | Diego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com> | 2021-07-19 13:17:33 -0500 |
commit | 7dab8f9435792c62f8e1e2b4d403f3ab71e8b2f1 (patch) | |
tree | 471ac0e1915c61a9f59b226e326884784275d822 /src | |
parent | Merge pull request #172 from fosscord/l10n_master (diff) | |
download | server-7dab8f9435792c62f8e1e2b4d403f3ab71e8b2f1.tar.xz |
[Gateway Endpoint] Encode response as JSON
Diffstat (limited to 'src')
-rw-r--r-- | src/routes/gateway.ts | 3 |
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; |