Use django-cors-headers instead of CORS by hand.