- I am using
Angular 4 / Ionic 3
for the frontend/mobile app. - I am using
Django 1.11 for the backend
.
When I try sending request from the browser as:
headers.append('Content-Type', 'application/json');
headers.append('Access-Control-Allow-Origin', '*');
this.http.post('http://0.0.0.0:8000/en/accounts/user/', {} ,
{headers:headers})
In my Django app I've used django-cors-headers
and set:
- CORS_ORIGIN_ALLOW_ALL = True
- CORS_ALLOW_CREDENTIALS = True
From the browser I get the expected response, but when testing from mobile app the CORS request doesn't seem to pass (returns Response with status: 0 for URL: null
)