相关疑难解决方法(0)

Nginx:使用标头绕过速率限制

这个答案非常适合绕过 IP 地址的速率限制。

如果我需要使用秘密标头绕过速率限制,我该如何实现?

参考:

http {
    geo $whitelist {
       default 0;
       # CIDR in the list below are not limited
       1.2.3.0/24 1;
       9.10.11.12/32 1;
       127.0.0.1/32 1;
    }
    map $whitelist $limit {
        0     $binary_remote_addr;
        1     "";
    }
    limit_conn_zone      $limit    zone=connlimit:10m;

    limit_conn           connlimit 5;
    limit_conn_log_level warn;   # logging level when threshold exceeded
    limit_conn_status    503;    # the error code to return
Run Code Online (Sandbox Code Playgroud)

nginx rate-limiting

3
推荐指数
2
解决办法
5253
查看次数

标签 统计

nginx ×1

rate-limiting ×1