"ddos challenge" style script #4
1 changed files with 12 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ local function createMockSharedDict()
|
|||
end
|
||||
|
||||
function TestDDoSProtectionChallenge:setup()
|
||||
-- First reset ngx to get the base ngx object
|
||||
resetNgx()
|
||||
|
||||
-- Create mock shared dictionaries
|
||||
ngx.shared = {
|
||||
aproxy_bans = createMockSharedDict(),
|
||||
|
|
@ -206,6 +209,9 @@ end
|
|||
TestDDoSProtectionChallengePaths = {}
|
||||
|
||||
function TestDDoSProtectionChallengePaths:setup()
|
||||
-- First reset ngx to get the base ngx object
|
||||
resetNgx()
|
||||
|
||||
-- Create mock shared dictionaries
|
||||
ngx.shared = {
|
||||
aproxy_bans = createMockSharedDict(),
|
||||
|
|
@ -352,6 +358,9 @@ end
|
|||
TestDDoSProtectionChallengeQuestion = {}
|
||||
|
||||
function TestDDoSProtectionChallengeQuestion:setup()
|
||||
-- First reset ngx to get the base ngx object
|
||||
resetNgx()
|
||||
|
||||
ngx.shared = {
|
||||
aproxy_bans = createMockSharedDict(),
|
||||
aproxy_tokens = createMockSharedDict()
|
||||
|
|
@ -464,6 +473,9 @@ end
|
|||
TestDDoSProtectionChallengePow = {}
|
||||
|
||||
function TestDDoSProtectionChallengePow:setup()
|
||||
-- First reset ngx to get the base ngx object
|
||||
resetNgx()
|
||||
|
||||
ngx.shared = {
|
||||
aproxy_bans = createMockSharedDict(),
|
||||
aproxy_tokens = createMockSharedDict()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue