title: 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>I am working on project using Django and React using Rest Framework. I have set <code>CORS_ALLOW_ALL_ORIGINS=True</code> in settings.py still i am getting error <code>Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/encrypt/' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</code></p>
  <p>I am using axios to post and get request. Suprisingly even after error post request is made but get request fails.
  This is react file using axios</p>
  <pre><code>sendImage =()=&gt; {
       this.activateSpinner()
       let formData = new FormData()
       formData.append('to_be_hidden', this.state.files[0], this.state.files[0].name)
       formData.append('used_to_hide', this.state.files[1], this.state.files[1].name)
       axios.post('http://127.0.0.1:8000/api/encrypt/', formData, {
           headers: {
              'accept': 'application/json',
              'content-type': 'multipart/form-data'
           }
       })
       .then(resp=&gt;{
           this.getImageClass(resp)
           console.log(resp.data.id)
       })
       .catch(err=&gt;{
           console.log(&quot;Code broke at send image&quot;)
           console.log(err)
       })
   }
  
   getImageClass =(obj)=&gt; {
       axios.get(`http://127.0.0.1:8000/api/encrypt/${obj.data.id}/`, {
           headers: {
              'accept': 'application/json',
           }
       })
       .then(resp=&gt;{
           this.setState({recentImage:resp})
           console.log(resp)
       })
       .catch(err=&gt;{
          console.log(&quot;Code broke at get image&quot;)
          console.log(err)
      })
      this.deactivateSpinner()
  
   }
  </code></pre>