title: Cookie in header javascript error "Refused to set unsafe header "Cookie""
body: <p>I have check all the post about setting the cookie via Header, and I always see that the people recommend put this:</p>
  
  <blockquote>
    <p>withCredentials: true</p>
  </blockquote>
  
  <p>I'm trying to do it and got the same error.</p>
  
  <pre><code> $scope.myAppsLoginResponse = JSON.stringify(response.data, null, 3);
          var dataC = JSON.parse($scope.myAppsLoginResponse);
          $cookies.cookie = 'Somethin here as cookie';
  
          var userId = dataC.user_id;
          var thePath = '/thePath';
          var theURL = 'https://theUrl';
  
          var cookieRes = $cookies.cookie;
          document.cookieMyApp = cookieRes;
  
          var headers2 = {};
              headers2 ['Accept-Language'] = 'es-ES';
              headers2 ['Cookie'] = document.cookieMyApp;
              headers2 ['Authorization'] = 'Basic Z2743ASasdh23Q=';
  
          var param = {}
              param ['userId'] = userId;
  
          var req2 = {
              method: 'GET',
              url: theURL + thePath ,
              headers: headers2,
              params: param,
              xhrFields: {
                  withCredentials: true
               }
          }
  </code></pre>
  
  <p>Response: </p>
  
  <blockquote>
    <p>Refused to set unsafe header "Cookie"</p>
  </blockquote>