CORS_ORIGIN_WHITELIST = ( 'google.com', 'hostname.example.com' )
python -m pip install django-cors-headers
CORS_ALLOWED_ORIGINS = [ "https://example.com", "https://sub.example.com", "http://localhost:8080", "http://127.0.0.1:9000" ]
MIDDLEWARE = [ ... 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', ... ]
INSTALLED_APPS = [ ... 'corsheaders', ... ]