I am developing an Angular 2 app that is using django-rest-framework a backend. I am doing my tests using a development server (ng serve from angular-cli) and another one for django (default from manage.py). Both server are accessible from 127.0.0.1 but on different ports.
My authentication system is based on cookie served by django-rest-framework. Everything works fine when using the views from django-rest-framework.
When I try to login from angular 2, I receive a valid response with a Set-Cookie Header. The problem is that the cookie is never set in the browser (tested in chrome and firefox).
Is this a CORS problem? I have corsheader app installed with the following parameters
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True