title: CORS during development without Access-Control-Allow-Origin
body: <p>The server answer with a <code>Access-Control-Allow-Origin</code> value set for the production. Is there a way to be permissive when the requests come from my development server ? Is there a Django setting to disable the cross-origin check when <code>DEBUG=True</code> for example ?</p>
  
  <p>I can't modify the <code>Access-Control-Allow-Origin</code>. The request is made with jquery ajax function.</p>
  
  <p>EDIT:</p>
  
  <p>I've installed <a href="https://github.com/ottoyiu/django-cors-headers" rel="noreferrer">https://github.com/ottoyiu/django-cors-headers</a> with <code>pip install django-cors-headers</code>, added the following in my <code>settings.py</code></p>
  
  <pre><code>if DEBUG:
      INSTALLED_APPS += ('corsheaders', )
  
  CORS_ORIGIN_ALLOW_ALL = DEBUG
  </code></pre>
  
  <p>And put the middleware :</p>
  
  <pre><code>MIDDLEWARE_CLASSES = [
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.locale.LocaleMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ...
  }
  </code></pre>
  
  <p>But I still get the error :</p>
  
  <p><em>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at _request_url_. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).</em></p>
  
  <p>If I inspect the response header, I don't see any <code>Access-Control-Allow-Origin</code> parameter.</p>