fix bug regarding SSL cookies.

This commit is contained in:
Taylor Otwell
2012-04-04 09:50:01 -05:00
parent bf886f3271
commit 3e00ce2efb
5 changed files with 23 additions and 3 deletions

View File

@@ -63,6 +63,14 @@ class Cookie {
}
else
{
// We don't want to send secure cookies over HTTP unless the developer has
// turned off the "SSL" application configuration option, which is used
// while developing the application but should be true in production.
if ($secure and ! Request::secure() and Config::get('application.ssl'))
{
return;
}
setcookie($name, $value, $time, $path, $domain, $secure);
}
}