title: React Django REST framework session is not persisting/working
body: <p>I'm working on a project with Django Rest Framework as back-end and React as front-end. When I set a session variable initially in some function/view and later when I try to access the different view through axios call and in that view if I try to access session variable which i created previously, I get KeyError. Session doesn't seem stored.</p>
  <p>I googled I got a similar issue which I'm facing.</p>
  <p><a href="https://stackoverflow.com/questions/50638749/django-rest-framework-reactjs-sessions-not-working">Django rest framework Reactjs sessions not working</a></p>
  <p>I followed the process by adding <strong>{ withCredentials: true }</strong> in axios call. Now I'm getting a different error. Now the issue is not able to access the backend. I get an error saying <strong>Access to XMLHttpRequest at 'http://127.0.0.1:8000/url/' from origin 'http://localhost:3000' has been blocked by CORS policy</strong></p>
  <p>Again I googled the issue which I'm getting and found that I've to add CORS_ORIGIN_WHITELIST in the django settings.py</p>
  <p>I followed the below post for that</p>
  <p><a href="https://stackoverflow.com/questions/43357687/django-python-rest-framework-no-access-control-allow-origin-header-is-present">Django Python rest framework, No &#39;Access-Control-Allow-Origin&#39; header is present on the requested resource in chrome, works in firefox</a></p>
  <p>I have added CORS_ORIGIN_WHITELIST like this</p>
  <pre><code>CORS_ORIGIN_WHITELIST = [
      'http://localhost:3000',
      'http://127.0.0.1:3000'
  ]
  </code></pre>
  <p>Still, I'm facing the same issue. I don't know what's going wrong.</p>