Make axios compatible with Request::ajax()
It seems the library doesn't send the `X-Requested-With: XMLHttpRequest` header by default, if it's not present `$request->ajax()` always returns false.
This commit is contained in:
parent
61b157f809
commit
f2981650a1
|
@ -25,6 +25,7 @@ window.Vue = require('vue');
|
|||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
|
|
Loading…
Reference in New Issue