【发布时间】:2018-01-28 08:13:20
【问题描述】:
如何为 heroku nodejs web 应用程序配置 nginx?我想配置 nginx,使 IP 地址在给定时间段内限制为 N 个请求。就像在 Reddit 上看到的经典“你做的太多了”消息一样。
谢谢,
查尔斯
【问题讨论】:
如何为 heroku nodejs web 应用程序配置 nginx?我想配置 nginx,使 IP 地址在给定时间段内限制为 N 个请求。就像在 Reddit 上看到的经典“你做的太多了”消息一样。
谢谢,
查尔斯
【问题讨论】:
Good starting point : heroku/heroku-buildpack-nginx
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
如果您需要更多帮助,请展示您迄今为止所做的尝试,我将编辑此答案。
【讨论】: