Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit 7948f1c

Browse files
naeem91ihtram
authored andcommitted
MCKIN-10378 - CSRF fix for mark as read (#192)
* MCKIN-10378 - CSRF fix for mark as read * version bump
1 parent ee286d0 commit 7948f1c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

edx_notifications/server/web/static/edx_notifications/js/views/notification_pane_view.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ var NotificationPaneView = Backbone.View.extend({
463463
}
464464
self.collection.fetch(
465465
{
466-
headers: {
467-
"X-CSRFToken": this.getCSRFToken()
466+
beforeSend: function(xhr) {
467+
xhr.setRequestHeader('X-CSRFToken', self.getCSRFToken());
468468
},
469469
type: 'POST',
470470
data: data,
@@ -539,8 +539,8 @@ var NotificationPaneView = Backbone.View.extend({
539539
var self = this;
540540
self.collection.fetch(
541541
{
542-
headers: {
543-
"X-CSRFToken": this.getCSRFToken()
542+
beforeSend: function(xhr) {
543+
xhr.setRequestHeader('X-CSRFToken', self.getCSRFToken());
544544
},
545545
data: {
546546
"mark_as": "read"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
3434

3535
setup(
3636
name='edx-notifications',
37-
version='0.7.7',
37+
version='0.7.8',
3838
description='Notification subsystem for Open edX',
3939
long_description=open('README.md').read(),
4040
author='edX',

0 commit comments

Comments
 (0)