Commit 17030114 authored by Dominik Hebeler's avatar Dominik Hebeler

removed throttle

parent eb4e152c
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure; use Closure;
use GrahamCampbell\Throttle\Facades\Throttle;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
class BrowserVerification class BrowserVerification
...@@ -36,12 +35,6 @@ class BrowserVerification ...@@ -36,12 +35,6 @@ class BrowserVerification
} }
} }
// Check if throttled
$accept = Throttle::check($request, 8, 1);
if (!$accept) {
Throttle::hit($request, 8, 1);
abort(429);
}
header('Content-type: text/html; charset=utf-8'); header('Content-type: text/html; charset=utf-8');
header('X-Accel-Buffering: no'); header('X-Accel-Buffering: no');
ini_set('zlib.output_compression', 'Off'); ini_set('zlib.output_compression', 'Off');
...@@ -53,7 +46,7 @@ class BrowserVerification ...@@ -53,7 +46,7 @@ class BrowserVerification
$key = md5($request->ip() . microtime(true)); $key = md5($request->ip() . microtime(true));
echo (view('layouts.resultpage.verificationHeader')->with('key', $key)->render()); echo (view('layouts.resultpage.verificationHeader')->with('key', $key)->render());
#flush(); // TODO Readd flush();
$answer = boolval(Redis::connection("cache")->blpop($key, 2)); $answer = boolval(Redis::connection("cache")->blpop($key, 2));
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"endclothing/prometheus_client_php": "^1.0", "endclothing/prometheus_client_php": "^1.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"globalcitizen/php-iban": "^2.6", "globalcitizen/php-iban": "^2.6",
"graham-campbell/throttle": "^7.5",
"jenssegers/agent": "^2.6", "jenssegers/agent": "^2.6",
"laravel/framework": "5.8.*", "laravel/framework": "5.8.*",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
...@@ -70,4 +69,4 @@ ...@@ -70,4 +69,4 @@
"@php artisan key:generate --ansi" "@php artisan key:generate --ansi"
] ]
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment