title: Django Python rest framework, No 'Access-Control-Allow-Origin' header is present on the requested resource in chrome, works in firefox
body: <p>I have researched and read quite a few Stackoverflow posts on the same issue. None have resolved my issue. </p>
  
  <p>My problem is that I am getting the "...No 'Access-Control-Allow-Origin' header is present on the requested resource..." error in my console.</p>
  
  <p>I am using:</p>
  
  <p>Chrome Version 57.0.2987.133
  Firefox Version 52.0.2</p>
  
  <p>Python 2.7
  Django 1.11a1</p>
  
  <p>AngularJS</p>
  
  <p>I am using MAMP to serve my front-end Angular stuff, and the django server for the backend stuff.</p>
  
  <p>In my django settings I have included the cors middleware and tried both the whitelist approach and just setting all to true: </p>
  
  <pre><code>MIDDLEWARE = [
  
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  
  ]
  
  CORS_ORIGIN_ALLOW_ALL = True
  </code></pre>
  
  <p>On google chrome I still get this error:</p>
  
  <blockquote>
    <p>localhost/:1 XMLHttpRequest cannot load {my endpoint url}. Redirect
    from {my endpoint url} to {my endpoint url with a } has been blocked
    by CORS policy: No 'Access-Control-Allow-Origin' header is present on
    the requested resource. Origin {requesting url} is therefore not
    allowed access.</p>
  </blockquote>
  
  <p>It works appropriately on Firefox, and I can't figure out why it won't work for google chrome. I haven't tried any other types of browsers. Any help will be very appreciated, thank you.</p>