Skip to content

Deny specific requests which ends with specific string and specific return codes during specific times

Notifications You must be signed in to change notification settings

Bit-Warrior-X/nginx_uri_cc_deny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

HTTP NGINX URI CC DENY Module

Against CC attack requests for specific URIs in specific duration.

Installation

  # cd /path/openresty
  # git clone https://github.com/Bit-Warrior-X/nginx_uri_cc_deny.git
  # ./configure -j2 --add-module=./nginx_uri_cc_deny/
  # make && make install

Configuration directives (same location syntax)

CC_DENY_URI

  • syntax: CC_DENY_URI uri codes times/duration
  • default: none
  • context: http, server, location

Set the cc deny rule

Example:
  CC_DENY_URI video.ts 404,302 5times/60s;

If the request ends with video.ts and it returns 404 or 302 more than 5 times in 60 seconds, nginx will deny this request. You can add multiple cc deny rules as you want.

About

Deny specific requests which ends with specific string and specific return codes during specific times

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages