Implement CSRF_COOKIE_HTTPONLY option support
Proposed patch allows passing of CSRF token as hidden input in template.
Without it, turning on of CSRF_COOKIE_HTTPONLY severely degrades Horizon
functionality.
Closes-bug:
$route
) {
- $http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken;
+ $http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken ||
+ $('input[name="csrfmiddlewaretoken"]').val();
// expose the legacy utils module
horizon.utils = hzUtils;
