limit_conn_zone $binary_remote_addr zone=alpha:8m;
limit_req_zone $binary_remote_addr zone=delta:8m rate=40r/s;

Domain nginx conf:

limit_conn alpha 5;
limit_req zone=delta burst=80 nodelay;


So a user can create only 5 connections per ip and can have 40
requests with a burst up to 80 connections.

Now i want to exclude Cloudflare ip's from this connection limits.


If memory serves right you can use

    location / {
        if ($remote_addr != 1.2.3.4) {
            error_page 404 = @no_whitelist;
            return 404;
        }
        # whitelisted
    }
    location @no_whitelist {
        limit_conn  adalpha 5;
    }

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to