diff --git a/src/Illuminate/Session/Middleware/StartSession.php b/src/Illuminate/Session/Middleware/StartSession.php index f3dc493c6e5d..ffb0f3707ac2 100644 --- a/src/Illuminate/Session/Middleware/StartSession.php +++ b/src/Illuminate/Session/Middleware/StartSession.php @@ -180,7 +180,8 @@ protected function addCookieToResponse(Response $response, SessionInterface $ses if ($this->sessionIsPersistent($config = $this->manager->getSessionConfig())) { $response->headers->setCookie(new Cookie( $session->getName(), $session->getId(), $this->getCookieExpirationDate(), - $config['path'], $config['domain'], Arr::get($config, 'secure', false) + $config['path'], $config['domain'], Arr::get($config, 'secure', false), + Arr::get($config, 'http_only', true) )); } }