From 51ddfcdaaa0cc46ca1ce893012117c9b5c4f27e0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 11 Mar 2023 05:38:54 +0100 Subject: [PATCH] Fix #7186 --- public/v1/js/ff/firefly.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/public/v1/js/ff/firefly.js b/public/v1/js/ff/firefly.js index a65627d5a2..fb7e6427d1 100644 --- a/public/v1/js/ff/firefly.js +++ b/public/v1/js/ff/firefly.js @@ -74,11 +74,19 @@ $(function () { function (start, end, label) { // send post. - $.post(dateRangeMeta.url, { - start: start.format('YYYY-MM-DD'), - end: end.format('YYYY-MM-DD'), - label: label, - _token: token + $.ajax({ + url: dateRangeMeta.url, + data: { + start: start.format('YYYY-MM-DD'), + end: end.format('YYYY-MM-DD'), + label: label, + _token: token + }, + type: 'POST', + headers: { + 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'), + 'Content-Type': 'application/x-www-form-urlencoded' + } }).done(function () { window.location.reload(true); }).fail(function () {