9

How does one configure nginx for a heroku nodejs web application? I would like to configure nginx such that an IP address is limited to N requests for a given time period. Like the classic "You're doing that too much" message as seen on Reddit.

Thanks,

Charles

1 Answer 1

6

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

If you need more help, show what you have tried so far and I will edit this answer.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much! I knew to a degree the nginx config but was having trouble finding examples of it being implemented specifically for a heroku cluster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.