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