mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 11:41:03 +08:00
leftover console.log
jshint is upset
This commit is contained in:
@ -134,8 +134,6 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
||||
// Add a CSRF token to all AJAX requests
|
||||
Discourse.csrfToken = $('meta[name=csrf-token]').attr('content');
|
||||
|
||||
console.log(Discourse.csrfToken);
|
||||
|
||||
$.ajaxPrefilter(function(options, originalOptions, xhr) {
|
||||
if (!options.crossDomain) {
|
||||
xhr.setRequestHeader('X-CSRF-Token', Discourse.csrfToken);
|
||||
|
@ -58,7 +58,7 @@ Discourse.Ajax = Em.Mixin.create({
|
||||
|
||||
// note: for bad CSRF we don't loop an extra request right away.
|
||||
// this allows us to eliminate the possibility of having a loop.
|
||||
if (xhr.status === 403 && xhr.responseText == "['BAD CSRF']") {
|
||||
if (xhr.status === 403 && xhr.responseText === "['BAD CSRF']") {
|
||||
Discourse.csrfToken = null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user