lms/vendor/inertiajs/inertia-laravel/src/EncryptHistoryMiddleware.php
2025-12-15 12:26:23 +01:00

24 lines
542 B
PHP

<?php
namespace Inertia;
use Closure;
use Illuminate\Http\Request;
class EncryptHistoryMiddleware
{
/**
* Handle the incoming request and enable history encryption. This middleware
* enables encryption of the browser history state, providing additional
* security for sensitive data in Inertia responses.
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle(Request $request, Closure $next)
{
Inertia::encryptHistory();
return $next($request);
}
}