From a85fdbab472fa828cd638cac05585f481bce8dfd Mon Sep 17 00:00:00 2001 From: Yassine Date: Tue, 4 Jun 2019 04:27:59 +0000 Subject: [PATCH] fix error 419 when previewing markdown template --- config/maileclipse.php | 1 + public/js/maileclipse-app.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/maileclipse.php b/config/maileclipse.php index 1b0f820..3d88589 100644 --- a/config/maileclipse.php +++ b/config/maileclipse.php @@ -56,6 +56,7 @@ */ 'middlewares' => [ + 'web', //'auth', ], diff --git a/public/js/maileclipse-app.js b/public/js/maileclipse-app.js index a835059..e789871 100644 --- a/public/js/maileclipse-app.js +++ b/public/js/maileclipse-app.js @@ -1,9 +1,10 @@ $(document).ready(function(){ -/*$.ajaxSetup({ + +$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, -});*/ +}); axios.defaults.headers.common['X-CSRF-TOKEN'] = $('meta[name="csrf-token"]').attr('content');