0
in fact the problem comes from Django which add a trialing space.
Then when angular tries to get http://test/url
but django redirect it to http://test/url/
This redirect imply data loosing.
My solution was to this modification into resource.js file.
Other solutions are possible, Django side with APPEND_SLASH as False
0
You may need to adjust your django settings accordingly:
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_WHITELIST = ('127.0.0.1:8000', )
SESSION_COOKIE_DOMAIN = '127.0.0.1'
CSRF_COOKIE_DOMAIN = '127.0.0.1'
also, if you use csrf token, then don’t forget this:
app.run(function($http) {
$http.defaults.headers.post['X-CSRFToken'] = $.cookie('csrftoken');
});
- [Django]-Relative font URLs in CSS cause 403s on S3
- [Django]-How can I create sophisticated Django Model Validation for Django Admin?
- [Django]-Is it possible to get an interactive django shell using the test database?
- [Django]-Testing Django project, how can I avoid Errno 10054?
Source:stackexchange.com