From d54b5360e2efc140378658f41a47b1da3a62317f Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 12 Mar 2019 13:55:34 +0100 Subject: [PATCH] identify ui requests as ajax requests --- scm-ui-components/packages/ui-components/src/apiclient.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scm-ui-components/packages/ui-components/src/apiclient.js b/scm-ui-components/packages/ui-components/src/apiclient.js index 77ebe8cf4e..551bb3e2eb 100644 --- a/scm-ui-components/packages/ui-components/src/apiclient.js +++ b/scm-ui-components/packages/ui-components/src/apiclient.js @@ -6,7 +6,9 @@ import type { BackendErrorContent } from "./errors"; const fetchOptions: RequestOptions = { credentials: "same-origin", headers: { - Cache: "no-cache" + Cache: "no-cache", + // identify the request as ajax request + "X-Requested-With": "XMLHttpRequest" } };