From fb8ad3790dd994191fcf881051d0d78c94be467a Mon Sep 17 00:00:00 2001 From: gitgitgogogo Date: Sat, 25 Mar 2023 08:30:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=8D=E5=90=91=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E9=99=90=E6=B5=81=E5=A4=B1=E6=95=88=20(#863)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://docs.colyseus.io/zh_hk/colyseus/how-to/rate-limit/ 使用nginx限流会只识别为服务器ip,需启用trust proxy --- service/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/service/src/index.ts b/service/src/index.ts index b011039..28041d1 100644 --- a/service/src/index.ts +++ b/service/src/index.ts @@ -82,5 +82,6 @@ router.post('/verify', async (req, res) => { app.use('', router) app.use('/api', router) +app.set('trust proxy', 1) app.listen(3002, () => globalThis.console.log('Server is running on port 3002'))