Skip to content

Commit

Permalink
fix regular requests being blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
david-d-h committed Oct 25, 2023
1 parent 48ea4e1 commit 9732cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Middleware/PreventStaticResponseMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function handle(Request $request, Closure $next)

$key = array_key_first($bypass);

$value = $bypass[$key];
$value = $bypass[$key] ?? null;

if (! $request->header($key) === $value) {
if (! $value || $request->header($key) !== $value) {
return $next($request);
}

Expand Down

0 comments on commit 9732cad

Please sign in to comment.