Skip to content

Commit ab2cb0a

Browse files
authored
Add X-Requested-With header
Add X-Requested-With header ("X-Requested-With": "XMLHttpRequest") so that frameworks that support checking the request type, e.g. Laravel, Symfony, Yii (and others, not necessarily PHP related) can use their respective helper methods e.g. in Laravel Request::ajax() etc/
1 parent 9dbb139 commit ab2cb0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dist/autocomplete.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ AutoComplete.defaults = {
192192
}
193193
},
194194
HttpHeaders: {
195-
"Content-type": "application/x-www-form-urlencoded"
195+
"Content-type": "application/x-www-form-urlencoded",
196+
"X-Requested-With": "XMLHttpRequest"
196197
},
197198
Limit: 0,
198199
MinChars: 0,
@@ -523,4 +524,4 @@ AutoComplete.defaults = {
523524
module.exports = AutoComplete;
524525

525526
},{}]},{},[1])(1)
526-
});
527+
});

0 commit comments

Comments
 (0)