如何为heroku nodejs Web应用程序配置nginx?我想配置nginx,使得IP地址限于给定时间段内的N个请求。就像经典"你做得那么多"在Reddit上看到的消息。
谢谢,
查尔斯
答案 0 :(得分:3)
Here is a good starting point : heroku-nginx-node-example
What you are looking for is rate limiting with nginx, read this for a better understanding
and here you have an example gist : Nginx reverse proxy with rate limiting
This is the file of the heroku-nginx-node-example that I think you have to add the limit_req options
如果您需要更多帮助,请展示您到目前为止所尝试的内容,我将编辑此答案。