From 0cdcc779bfe4d2aedf15de26b14e1ff940202334 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 30 Jan 2017 12:07:53 -0500 Subject: [PATCH] Make axios automatically send the `X-CSRF-TOKEN` --- resources/assets/js/bootstrap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index 4e8b9586..e89ea5a6 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -28,6 +28,7 @@ window.Vue = require('vue'); window.axios = require('axios'); window.axios.defaults.headers.common = { + 'X-CSRF-TOKEN': window.Laravel.csrfToken, 'X-Requested-With': 'XMLHttpRequest' };