title: Nginx Deployed Anguler Frontned Does not Connect to DRF backend
body: <p>I have deployed drf backend and angular frontend in the same aws instance, i deployed them using Nginx and gunicron for the drf and Nginx for the angular. I tested the drf API using postman it works fine but the angular frontend doesn't connect to the API, the site works but it cannot connect to the backend API.It shows</p>
  <p>Access to XMLHttpRequest at 'http://3.129.126.13:8080/api/products?search=asus&amp;page=1' from origin 'http://3.129.126.13' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</p>
  <p>I have whitelisted the frontend address in the python app setting.</p>
  <p>frontend is hosted at 80 and the backend is at 8080.</p>
  <p>server block for backend:</p>
  <pre><code>server {
      listen 8080;
      server_name 0.0.0.0;
  
      location = /favicon.ico { access_log off; log_not_found off; }
  
      location /static/ {
              root /home/ubuntu/Sheradam_backend;
      }
  
      location / {
              include proxy_params;
              proxy_pass http://unix:/home/ubuntu/Sheradam_backend/Sheradam_backend.sock;
  
      }
  }
  
  </code></pre>
  <p>server block for frontend</p>
  <pre><code>server {
      listen 80;
      listen [::]:80;
      server_name Sheradambd.com;
      root /home/ubuntu/Sheradam_frontend/dist/SheraDam;
      server_tokens off;
      index index.html index.htm;
  
      location / {
          # First attempt to server request as file, then         
          # as directory, then fall back to displaying a 404.          
          try_files $uri $uri/ /index.html =404;
      }
  }
  </code></pre>
  <p>python app setting:</p>
  <pre><code>STATIC_URL = '/static/'
  
  CORS_ORIGIN_ALLOW_ALL = False
  CORS_ORIGIN_WHITELIST = (
      'http://3.129.126.13',
  )
  
  </code></pre>