diff --git a/src/Http/Middleware/MaintenanceMiddleware.php b/src/Http/Middleware/MaintenanceMiddleware.php index 9be7495..a14e3fc 100644 --- a/src/Http/Middleware/MaintenanceMiddleware.php +++ b/src/Http/Middleware/MaintenanceMiddleware.php @@ -252,17 +252,17 @@ protected function createBypassCookie(string $secret): Cookie 'hash' => hash_hmac('sha256', (string) $expire, $secret) ]; $value = base64_encode(Json::encode($data)); - - $cookie = new Cookie($name, $value); - $sessionCookieConfig = $this->config->get('session.cookie', []); - $cookie->withExpires($expire) - ->withPath($sessionCookieConfig['path'] ?? null) - ->withDomain($sessionCookieConfig['domain'] ?? null) - ->withSecure($sessionCookieConfig['secure'] ?? false) - ->withHttpOnly(true); - + $cookie = new Cookie( + $name, + $value, + $expire, + $sessionCookieConfig['domain'] ?? null, + $sessionCookieConfig['path'] ?? null, + $sessionCookieConfig['secure'] ?? false, + true + ); return $cookie; }