Skip to content

Commit

Permalink
change formatting of config var
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 1, 2017
1 parent c2d6cdb commit e69d722
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Illuminate/Cookie/CookieServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public function register()
$this->app->singleton('cookie', function ($app) {
$config = $app->make('config')->get('session');

return (new CookieJar)->setDefaultPathAndDomain($config['path'], $config['domain'], $config['secure'], $config['sameSite']);
return (new CookieJar)->setDefaultPathAndDomain(
$config['path'], $config['domain'], $config['secure'], $config['same_site'] ?? null
);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected function addCookieToResponse($request, $response)
$response->headers->setCookie(
new Cookie(
'XSRF-TOKEN', $request->session()->token(), Carbon::now()->getTimestamp() + 60 * $config['lifetime'],
$config['path'], $config['domain'], $config['secure'], false, false, $config['sameSite']
$config['path'], $config['domain'], $config['secure'], false, false, $config['same_site'] ?? null
)
);

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Session/Middleware/StartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ protected function addCookieToResponse(Response $response, Session $session)
$response->headers->setCookie(new Cookie(
$session->getName(), $session->getId(), $this->getCookieExpirationDate(),
$config['path'], $config['domain'], Arr::get($config, 'secure', false),
Arr::get($config, 'http_only', true), false, $config['sameSite']
Arr::get($config, 'http_only', true), false, $config['same_site'] ?? null
));
}
}
Expand Down

0 comments on commit e69d722

Please sign in to comment.