Is it possible to set session lifetime less than 1 minute?
Hello,
Is it possible to set session lifetime less than 1 minute?
Or that's the minimum? (For testing purposes).
The following didn't work (I set it directly in the session.php file for the test):
'lifetime' => 0.5
'lifetime' => "0.5"
'lifetime' => 1/2
'lifetime' => (1/2)
// and some more failed attempts ð
Thanks
@ligonsker In general you cannot set session lifetime for less than 1 minute.
But you can use a middleware.
For example-
// SetSessionLifetime
public function handle(Request $request, Closure $next)
{
ini_set('session.cookie_lifetime', 30);
ini_set('session.gc_maxlifetime', 30);
return $next($request);
}
Now apply the middleware.
Why don't you just prevent users logging in? ðĪŠ
@Snapey That's the next move ððĪĢð
Please or to participate in this conversation.