From dae2e3e0e4eff866442b8929875ae296c1fb1acf Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Wed, 30 Oct 2024 22:24:03 -0500 Subject: [PATCH] trust proxy? --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 4e82800..a2990db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -140,6 +140,8 @@ app.use("/", async (req: Request, res: Response)=>{ } }); +app.set('trust proxy', (ip:string) => ip.startsWith("127.")); + const PORT = process.env.PORT || Number(process.argv[2]) || 8080; app.listen(PORT, ()=>{ console.log(`Server running on port ${PORT}`);