title: origin has been blocked by CORS policy Response to preflight request doesn't pass access control check
body: <p>Hello I am using Jqgrid and I want to display all orders list in JqGrid , But order data not display in Jqgrid . Any Expert can tell me what is the problem in my code and why data is not display in my jqgrid .First when grid load there no error show only show on grid "error" , but when I refresh grid then show this error :</p>
  
  <blockquote>
    <p>Access to XMLHttpRequest at
    '<a href="http://api.bigcommerce.com/stores/4jwabif3gj/v2/orders.json" rel="nofollow noreferrer">http://api.bigcommerce.com/stores/4jwabif3gj/v2/orders.json</a>' from
    origin '<a href="http://localhost:62797" rel="nofollow noreferrer">http://localhost:62797</a>' has been blocked by CORS policy:
    Response to preflight request doesn't pass access control check:
    Redirect is not allowed for a preflight request.</p>
  </blockquote>
  
  <p>HTML</p>
  
  <pre><code>&lt;table id="JqGrid"&gt;&lt;/table&gt;
   &lt;div id="JqGridPager"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JQuery</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
  
      jQuery(document).ready(function ($) {
          var $grid = $("#JqGrid");
          $grid.jqGrid({
              url: 'http://api.bigcommerce.com/stores/4jwabif3gj/v2/orders.json',
              datatype: 'json',
             ajaxGridOptions: { xhrFields: { withCredentials: true } }, 
  
             colNames: ['id', 'billing_address', 'date_created', 'date_modified', 'date_shipped', 'status'],
              colModel: [
                  { name: 'id', index: 'id', width: 10 },
                  { name: 'billing_address', index: 'billing_address', width: 50 },
                  { name: 'date_created', index: 'date_created', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
                  { name: 'date_modified', index: 'date_modified', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
                  { name: 'date_shipped', index: 'date_shipped', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
                  { name: 'status', index: 'status', width: 50 },
              ],
              caption: "Employees",
              pager: "#JqGridPager",
              loadBeforeSend: function (jqXHR) {
                  jqXHR.setRequestHeader("X-Auth-Client", 'clientstring', "X-Auth-Token", 'tokenid');
              },
              viewrecords: true,
              width: 1100,
              height: 400
          });
          $grid.jqGrid('navGrid', '#JqGridPager', { edit: false, add: false, del: false })
      });
  &lt;/script&gt;
  </code></pre>