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

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

使用nginx限流会只识别为服务器ip,需启用trust proxy
main
gitgitgogogo 2 years ago committed by GitHub
parent 902321026b
commit fb8ad3790d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,5 +82,6 @@ router.post('/verify', async (req, res) => {
app.use('', router) app.use('', router)
app.use('/api', router) app.use('/api', router)
app.set('trust proxy', 1)
app.listen(3002, () => globalThis.console.log('Server is running on port 3002')) app.listen(3002, () => globalThis.console.log('Server is running on port 3002'))

Loading…
Cancel
Save