title: Fully disable cookies in Laravel 4 API
body: <p>I am using Laravel to build a RESTful API. I use Basic HTTP Auth (<code>Authenticate header</code>), with this filter:</p>
  
  <pre class="lang-php prettyprint-override"><code>Route::filter('auth', function()
  {
      $credentials = ['email' =&gt; Request::getUser(), 'password' =&gt; Request::getPassword()];
  
      if (!Auth::once($credentials)) {
          $response   = ['error' =&gt; true, 'message' =&gt; 'Unauthorized request'];
          $code       = 401;
          $headers    = ['WWW-Authenticate' =&gt; 'Basic'];
  
          return Response::json($response, $code, $headers);
      }
  });
  </code></pre>
  
  <p>It works, but Laravel then tries to set a cookie for the user (sending a <code>Set-Cookie</code> header). I tried setting the <code>session.driver</code> configuration key to <code>array</code>, only to see it now sends a <code>Set-Cookie: laravel_session=deleted</code> thingy.</p>
  
  <p>How can i fully disable this <code>Set-Cookie</code> header?</p>
  
  <p>Thank you.</p>