We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Should we use this registration
$panel->middleware([ config('password-expiry.password_expiry_middleware', PasswordExpiryMiddleware::class), ]);
instead of
$panel->middleware([ PasswordExpiryMiddleware::class ]);
and also should we pass jsonresponses through the middleware as in the example
public function handle(Request $request, Closure $next): Response | RedirectResponse { if ( $this->passwordHasExpired() && !$request->routeIs(PasswordExpiry::getPasswordExpiryRoute()) && !$request->routeIs('*.auth.*') ) { return redirect(route(PasswordExpiry::getPasswordExpiryRoute())); } $response = $next($request); if ($response instanceof JsonResponse) { return response($response->getContent(), $response->getStatusCode(), $response->headers->all()); } return $response; }
public function handle(Request $request, Closure $next): Response | RedirectResponse { if ( $this->passwordHasExpired() && !$request->routeIs(PasswordExpiry::getPasswordExpiryRoute()) && !$request->routeIs('*.auth.*') ) { return redirect(route(PasswordExpiry::getPasswordExpiryRoute())); } return $next($request); }
?
Currently I have a problem that middleware in my plugin does not work. But when I use the proposed registration, it works.
You should try to set custom class in config + try to pass JsonResponse through the middleware
3.0
8.3
11.0
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
Hi! Should we use this registration
instead of
and also should we pass jsonresponses through the middleware as in the example
instead of
?
Currently I have a problem that middleware in my plugin does not work. But when I use the proposed registration, it works.
How to reproduce the bug
You should try to set custom class in config + try to pass JsonResponse through the middleware
Package Version
3.0
PHP Version
8.3
Laravel Version
11.0
Which operating systems does with happen with?
No response
Notes
No response
The text was updated successfully, but these errors were encountered: