1 | <?php |
||||||
2 | |||||||
3 | namespace Spinzar\SignedUrl\Middleware; |
||||||
4 | |||||||
5 | use Closure; |
||||||
6 | |||||||
7 | class ValidateSignedUrl |
||||||
8 | { |
||||||
9 | /** |
||||||
10 | * Handle an incoming request. |
||||||
11 | * |
||||||
12 | * @param \Illuminate\Http\Request $request |
||||||
13 | * @param \Closure $next |
||||||
14 | * |
||||||
15 | * @return mixed |
||||||
16 | */ |
||||||
17 | public function handle($request, Closure $next) |
||||||
18 | { |
||||||
19 | $urlIsSigned = app('signed-url')->validate($request->fullUrl()); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
20 | |||||||
21 | if (!$urlIsSigned) { |
||||||
22 | abort(403); |
||||||
0 ignored issues
–
show
The function
abort was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
23 | } |
||||||
24 | |||||||
25 | return $next($request); |
||||||
26 | } |
||||||
27 | } |
||||||
28 |