title: django-cors-headers settings.py django app not working even though I've added all the requirements to settings.py
body: <p>So, I'm using django-cors-headers with Rest Framework with Django 1.11.x, and I've pretty much followed the general advice, and yet, I'm still getting <code>x has been blocked by CORS policy: No 'Access-Control-Allow-Origin'</code> header is present on the requested resource." As you can see, I've added 'corsheaders' to INSTALLED_APPS and <code>'corsheaders.middleware.CorsMiddleware'</code> to <code>Middleware</code>, and I've set <code>CORS_ORIGIN_ALLOW_ALL</code> to true and <code>CORS_ALLOW_CREDENTIALS</code> to true, too. I've even included a whitelist option, though it's my understanding that, if <code>CORS_ORIGIN_ALLOW_ALL</code> is set to true, the whitelist isn't needed. I've also <code>pip3 install django-cors-headers</code>. What is the deal??? BTW, I've read the README on the django-cors-headers repo. I want to know why it's not working.</p>
  
  <pre><code>INSTALLED_APPS = [
  
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'rest_framework',
      'corsheaders',
      'books.apps.BooksConfig',
  ]
  
  
  MIDDLEWARE = [
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  
  CORS_ORIGIN_ALLOW_ALL = True
  CORS_ALLOW_CREDENTIALS = True
  CSRF_TRUSTED_ORIGINS = (
      'localhost:5555' 
  )
  </code></pre>
  
  <p>And my js file that's accessing from localhost:5555 is:</p>
  
  <pre><code>var request = $.ajax({
      type: 'GET',
      url: url,
      dataType: 'json',
      xhrFields: {
          withCredentials: true
      }});
  </code></pre>