fix: 反向代理限流失效 (#863)

https://docs.colyseus.io/zh_hk/colyseus/how-to/rate-limit/

使用nginx限流会只识别为服务器ip,需启用trust proxy
This commit is contained in:
gitgitgogogo 2023-03-25 08:30:15 +08:00 committed by GitHub
parent 902321026b
commit fb8ad3790d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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'))