fix: 反向代理限流失效 (#863)
https://docs.colyseus.io/zh_hk/colyseus/how-to/rate-limit/ 使用nginx限流会只识别为服务器ip,需启用trust proxy
This commit is contained in:
parent
902321026b
commit
fb8ad3790d
|
@ -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'))
|
||||
|
|
Loading…
Reference in New Issue