Skip to content

Commit

Permalink
fix: 反向代理限流失效 (#863)
Browse files Browse the repository at this point in the history
https://docs.colyseus.io/zh_hk/colyseus/how-to/rate-limit/

使用nginx限流会只识别为服务器ip,需启用trust proxy
  • Loading branch information
gitgitgogogo authored Mar 25, 2023
1 parent 3a66029 commit 30492fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

0 comments on commit 30492fe

Please sign in to comment.