title: How can I set the samesite cookie attribute in CakePHP 2.3?
body: <p>CakePHP 2.3 sets the Session variables (including cookie attributes) in the core.php file. I need to set <code>samesite=None</code> and <code>Secure=true</code> for the session cookie, but it doesn't appear to have those settings available in the configuration, which shows only the following options:</p>
  <ul>
  <li><code>Session.cookie</code> - The name of the cookie to use. Defaults to 'CAKEPHP'</li>
  <li><code>Session.timeout</code> - The number of minutes you want sessions to live for. This timeout is handled by CakePHP</li>
  <li><code>Session.cookieTimeout</code> - The number of minutes you want session cookies to live for.</li>
  <li><code>Session.checkAgent</code> - Do you want the user agent to be checked when starting sessions? You might want to set the value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX</li>
  <li><code>Session.defaults</code> - The default configuration set to use as a basis for your session. There are four builtins: php, cake, cache, database.</li>
  <li><code>Session.handler</code> - Can be used to enable a custom session handler.  Expects an array of of callables, that can be used with <code>session_save_handler</code>.  Using this option will automatically add <code>session.save_handler</code> to the ini array.</li>
  <li><code>Session.autoRegenerate</code> - Enabling this setting, turns on automatic renewal of sessions, and
  sessionids that change frequently. See CakeSession::$requestCountdown.</li>
  <li><code>Session.ini</code> - An associative array of additional ini values to set.</li>
  </ul>
  <p>This is how I have it now:</p>
  <pre><code>Configure::write('Session', array(
                                      'defaults' =&gt; 'database',
                                      'handler' =&gt; array('model' =&gt; 'cake_sessions'),
                                      'timeout' =&gt; 60
                                      ));
  </code></pre>
  <p>Is there a workaround for this? I've been looking at how to do this with php but I'm not sure how I would edit the session cookie that CakePHP creates with the attributes I want, or if that is possible at all once the cookie has been created.</p>