Do not add X-Requested-With header for simple requests (#5931)

This commit is contained in:
Saq Imtiaz
2021-08-17 10:56:52 +02:00
committed by GitHub
parent 199ca57f1c
commit 24956087cc
2 changed files with 26 additions and 1 deletions

View File

@@ -114,6 +114,10 @@ TiddlyWebAdaptor.prototype.login = function(username,password,callback) {
},
callback: function(err) {
callback(err);
},
headers: {
"accept": "application/json",
"X-Requested-With": "TiddlyWiki"
}
};
this.logger.log("Logging in:",options);
@@ -132,6 +136,10 @@ TiddlyWebAdaptor.prototype.logout = function(callback) {
},
callback: function(err,data) {
callback(err);
},
headers: {
"accept": "application/json",
"X-Requested-With": "TiddlyWiki"
}
};
this.logger.log("Logging out:",options);