Nginx Rate Limiting by Referrer?
Posted
by
SteveEdson
on Server Fault
See other posts from Server Fault
or by SteveEdson
Published on 2013-10-21T09:40:06Z
Indexed on
2013/10/21
9:57 UTC
Read the original article
Hit count: 316
I've successfully set up rate limiting on IP addresses like so,
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
But I was wondering if its possible to do the same on referrers? For example, if a site gets placed in an iframe on a third party site, which generates too much traffic to handle.
I can't find any nginx variables for the referrer anywhere.
Is this possible? Or can the solution be achieved in a different way?
Thanks.
© Server Fault or respective owner