Commit 1a48e785 authored by Dominik Hebeler's avatar Dominik Hebeler

Added missing Cache import

parent 8d841a33
......@@ -5,6 +5,7 @@ namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Redis;
use Jenssegers\Agent\Agent;
use Cache;
class BrowserVerification
{
......@@ -59,12 +60,12 @@ class BrowserVerification
$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();
$answer = Redis::connection("cache")->blpop($key, 2);
if ($answer !== null) {
echo (view('layouts.resultpage.resources')->render());
echo(view('layouts.resultpage.resources')->render());
flush();
$request->request->add(["headerPrinted" => true, "jskey" => $key]);
return $next($request);
......@@ -74,9 +75,8 @@ class BrowserVerification
$params["mgv"] = $key;
$url = route("resultpage", $params);
echo (view('layouts.resultpage.unverifiedResultPage')
echo(view('layouts.resultpage.unverifiedResultPage')
->with('url', $url)
->render());
}
}
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