node.js-如何为Heroku Node.js Web应用程序配置Nginx

如何为Heroku Node.js Web应用程序配置Nginx?我想将nginx配置为在给定的时间段内将IP地址限制为N个请求.就像在Reddit上看到的经典的“您做得太多”一样.

谢谢,

查尔斯

最佳答案
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

如果您需要更多帮助,请显示到目前为止的尝试,我将编辑此答案.

dawei

【声明】:丽水站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。