From e7441c0d213a882ca0f5e9e849ade9fc0fc83c5b Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 29 Nov 2019 10:03:00 +1100 Subject: [PATCH] Ensure that API Explorer passes through necessary header --- ang/api4Explorer/Explorer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ang/api4Explorer/Explorer.js b/ang/api4Explorer/Explorer.js index 3d596a2b18..5f5a14cbbf 100644 --- a/ang/api4Explorer/Explorer.js +++ b/ang/api4Explorer/Explorer.js @@ -472,7 +472,11 @@ $http.get(CRM.url('civicrm/ajax/api4/' + $scope.entity + '/' + $scope.action, { params: angular.toJson(getParams()), index: $scope.index - })).then(function(resp) { + }), { + headers: { + 'X-Requested-With': 'XMLHttpRequest' + } + }).then(function(resp) { $scope.loading = false; $scope.status = 'success'; $scope.result = [formatMeta(resp.data), prettyPrintOne(JSON.stringify(resp.data.values, null, 2), 'js', 1)]; -- 2.25.1