Improve cookie secure setting values

HTTPS 를 사용하는 상황에 대한 판단을 할 수 있는 상황에서 쿠키의 secure flag 를 달아준다.
This commit is contained in:
Min-Soo Kim 2018-04-22 23:58:13 +09:00
parent 3c1e5bd64f
commit 73da2af393
6 changed files with 12 additions and 7 deletions

View file

@ -294,8 +294,10 @@ class Session
// Step 1: if the current site is not the default site, send SSO validation request to the default site.
if(!$is_default_domain && !\Context::get('sso_response') && $_COOKIE['sso'] !== md5($current_domain))
{
$ssl_only = (\RX_SSL && config('session.use_ssl')) ? true : false;
// Set sso cookie to prevent multiple simultaneous SSO validation requests.
setcookie('sso', md5($current_domain), 0, '/');
setcookie('sso', md5($current_domain), 0, '/', null, null, $ssl_only, true);
// Redirect to the default site.
$sso_request = Security::encrypt($current_url);