Skip to content

Commit

Permalink
for codesy#72 - remove default CSRF protection
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Dec 27, 2014
1 parent cd9837f commit 68478ee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion auctions/templates/bid.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
{% else %}
<form id="codesy_bid_form" action="//{{domain}}{% url 'bid-list' %}" method="POST" >
{% endif %}
{% csrf_token %}
<input name="url" type="hidden" value="{{ url }}"></input>
<input name="ask" type="text" placeholder="ask" value="{{ bid.ask }}"></input>
<input name="offer" type="text" placeholder="offer" value="{{ bid.offer }}"></input>
Expand Down
1 change: 0 additions & 1 deletion codesy/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
Expand Down
2 changes: 2 additions & 0 deletions codesy/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ <h2>3. Add to your browser</h2>
method: "PATCH",
url: "/users/{{ request.user.id }}/",
beforeSend: function(xhr, settings) {
/* FIXME: with https://github.com/codesy/codesy/issues/72
if (!this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", $.cookie("csrftoken"));
}
*/
},
data: {
balanced_card_href: card_href,
Expand Down

0 comments on commit 68478ee

Please sign in to comment.