mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
23 lines
427 B
PHP
23 lines
427 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
|
|
class Telegram
|
|
{
|
|
/**
|
|
* Handle an incoming request.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle($request, Closure $next)
|
|
{
|
|
if (sysConfig('telegram_token') && hash_equals(sysConfig('telegram_token'), $request->input('access_token'))) {
|
|
abort(500, 'authentication failed');
|
|
}
|
|
|
|
return $next($request);
|
|
}
|
|
}
|