title: How to set CORS headers to a client
body: <p>I'm using this client</p>
  
  <blockquote>
    <p>var client = new forcetk.Client();</p>
  </blockquote>
  
  <p>To make requests. I'm trying to pass another URL but the</p>
  
  <blockquote>
    <p>has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</p>
  </blockquote>
  
  <p>error shows up. Can i set up any headers to the client? Is there a way to make my client's request inside an XMLHttpRequest call? Any help would be much appreciated. Thanks in advance.</p>
  
  <p>Here is my oversimplified code </p>
  
  <pre><code>&gt; forcetk.Client.prototype.createBlob = function (objtype, fields,
  &gt; filename, payloadField, payload, callback, error, retry) {
  &gt; 'use strict';
  &gt;         let res = this.blob('/' + this.apiVersion + '/sobjects/' + objtype + '/',
  &gt;                          fields, filename, payloadField, payload, callback, error, retry);
  &gt;         res.header("Access-Control-Allow-Origin", "*");
  &gt;         return res;
  &gt;     };
  </code></pre>