Skip to content

satrobit/lua-resty-ddos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Name

lua-resty-ddos - This library uses Cookie Validation to detect bots from real users.

Table of Contents

Status

This library is WIP. Please don't use in production!

Synopsis

    lua_package_path "/path/to/lua-resty-ddos/lib/?.lua;;";

    server {
        location / {
            rewrite_by_lua '
                local ddos = require "resty.ddos"
                ddos.run("some-key")
            ';
        }
    }

Methods

Back to TOC

run

syntax: ddos:run(key)

Runs the module with the provided key to use in JWT.

Back to TOC

Installation

Run the following in the module directory:

    luarocks make

You need to configure the lua_package_path directive to add the path of your lua-resty-ddos source tree to ngx_lua's Lua module search path, as in

    http {
        lua_package_path "/path/to/lua-resty-ddos/lib/?.lua;;";
        ...
    }

and then load the library in Lua:

    local ck = require "resty.ddos"

Back to TOC

Authors

Amir Keshavarz amirkekh@gmail.com.

Back to TOC

About

A sample module for ddos mitigation in OpenResty

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages