title: Django Rest Framework CORS blocking XMLHttpRequest
body: <p>I have set up my CORS policy using Django-cors-headers with the following settings:</p>
  
  <pre><code>APPEND_SLASH=False
  CORS_ORIGIN_ALLOW_ALL = True
  CORS_ALLOW_CREDENTIALS = True
  CORS_ORIGIN_WHITELIST = (
      'localhost:8000',
      'localhost:3000',
      'localhost'
  )
  </code></pre>
  
  <p>I have also added it to installed_apps and middleware.</p>
  
  <p>Now I am making a React app for the front end and using AXIOS for my API requests. When I make an API request to log in to my app the CORS policy allows it. But, if I make an API request that requires a Token, I get:</p>
  
  <blockquote>
    <p>Access to XMLHttpRequest at 'localhost:8000/api/TestConnection/' from origin '<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.</p>
  </blockquote>
  
  <p>It seems that I need to allow XMLHttpRequest for supported protocol schemes but I cannot find anything in the pypi documentation about this.</p>
  
  <p>EDIT:
  Here is the AXIOS Request:</p>
  
  <pre><code>axios.post("localhost:8000/api/TestConnection/",
      {headers:
        {
            'Authorization': "Bearer " + localStorage.getItem('JWTAccess')
        }
      },
      { 
        testString: 'Hello API'
      })
      .then(response =&gt; {
        console.log(response)
        })
      .catch(error =&gt; {
        console.log(error);
  })
  </code></pre>
  
  <p>Thank you!</p>