set bereq.http.connection = "close"; } sub vcl_pass { # 省略 set bereq.http.connection = "close"; } sub vcl_pipe { # 省略 set bereq.http.connection = "close"; }
10(limit) / 1(delta) = 60秒間に600件以上同じIPアドレスからリクエストがきたら、 PenaltyBoxにentryの値が入る unset req.http.x-penalized; set req.http.x-penalized = ratelimit.check_rate( req.http.Fastly-Client-IP, # entry rc, # Rate Counter to be used 1, # delta 60, # window 10, # limit pb, # Penalty Box to be used 1m # The penalty box. must be between 1m to 1h );