mirror of
https://github.com/C0nw0nk/Nginx-Lua-Anti-DDoS.git
synced 2023-12-14 04:31:21 +00:00
Update anti_ddos_challenge.lua
Remove junk javascript code. Change the timer text element to inform the user to refresh their page incase their browser blocks it. (Firefox is a prime culprit of this "firefox prevented this page from automatically reloading")
This commit is contained in:
@ -634,10 +634,8 @@ local javascript_anti_ddos = [[
|
||||
//end javascript puzzle
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == ]] .. expected_header_status .. [[) { //status may be 503 so local var to control both response and switch between POST and GET
|
||||
location.reload(true);
|
||||
document.getElementById("status").innerHTML = "Refresh your page.";
|
||||
}
|
||||
document.getElementById("status").innerHTML = "Refresh your page.";
|
||||
location.reload(true);
|
||||
};
|
||||
xhttp.open("]] .. javascript_REQUEST_TYPE .. [[", "]] .. request_uri .. [[", true);
|
||||
]] .. javascript_REQUEST_headers .. [[
|
||||
|
Reference in New Issue
Block a user