From 9b4e8a5f54058692211a424384839c755c035fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr?= <8machy@seznam.cz> Date: Tue, 5 Nov 2024 11:48:55 +0100 Subject: [PATCH] Add X-Current-Url header to every ajax request --- packages/signalizejs/src/modules/ajax.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/signalizejs/src/modules/ajax.js b/packages/signalizejs/src/modules/ajax.js index 76550d6..87a71d4 100755 --- a/packages/signalizejs/src/modules/ajax.js +++ b/packages/signalizejs/src/modules/ajax.js @@ -19,6 +19,7 @@ export default async ({ resolve }, config) => { try { requestOptions.headers = { 'X-Requested-With': config?.requestedWithHeader ?? 'XMLHttpRequest', + 'X-Current-Url': window.location.href, Accept: config?.acceptHeader ?? '*', ...options.headers ?? {} }