title: React admin-on-rest adding X-Total-Count
body: <p>I'm using admin-on-rest but getting an error when trying to connect to github api</p>
  
  <p>Error:</p>
  
  <p><strong>The X-Total-Count header is missing in the HTTP Response. The jsonServer REST client expects responses for lists of resources to contain this header with the total number of results to build the pagination. If you are using CORS, did you declare X-Total-Count in the Access-Control-Expose-Headers header?</strong></p>
  
  <p>and</p>
  
  <p><strong>Warning: Missing translation for key: "The X-Total-Count header is missing in the HTTP Response. The jsonServer REST client expects responses for lists of resources to contain this header with the total number of results to build the pagination. If you are using CORS, did you declare X-Total-Count in the Access-Control-Expose-Headers header?"</strong></p>
  
  <p>I'm trying to add the X-Total-Count header but then got a new error</p>
  
  <pre><code>render() {
  
  const httpClient = (url, options = {}) =&gt; {
    if (!options.headers) {
      options.headers = new Headers({Accept: 'application/json'});
    }
    // add your own headers here
    options.headers.set('X-Total-Count', '32');
    return fetchUtils.fetchJson(url, options);
  }
  
  const restClient = jsonServerRestClient('https://api.github.com', httpClient);
  
  return (
    &lt;Admin restClient={restClient}&gt;
      &lt;Resource name="users" list={PostList}/&gt;
    &lt;/Admin&gt;
  );
  }
  </code></pre>
  
  <p><strong>Failed to load <a href="https://api.github.com/users?_end=10&amp;_order=DESC&amp;_sort=id&amp;_start=0" rel="nofollow noreferrer">https://api.github.com/users?_end=10&amp;_order=DESC&amp;_sort=id&amp;_start=0</a>: Request header field x-total-count is not allowed by Access-Control-Allow-Headers in preflight response.</strong></p>