From b80c3e6760d980334da884069a89ab2f8713aa37 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 15 Oct 2025 16:51:44 +0100 Subject: [PATCH] Frontend service: Pass query params to `/bootdata` call (#112448) pass query params to /bootdata call --- pkg/services/frontend/index.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/services/frontend/index.html b/pkg/services/frontend/index.html index 34c4d4f89ed..9f5b5d48dba 100644 --- a/pkg/services/frontend/index.html +++ b/pkg/services/frontend/index.html @@ -212,7 +212,16 @@ * Will return a rejected promise on unrecoverable errors. **/ async function fetchBootData() { - const resp = await fetch("/bootdata"); + const queryParams = new URLSearchParams(window.location.search); + + // pass the search params through to the bootdata request + // this allows for overriding the theme/language etc + const bootDataUrl = new URL('/bootdata', window.location.origin); + for (const [key, value] of queryParams.entries()) { + bootDataUrl.searchParams.append(key, value); + } + + const resp = await fetch(bootDataUrl); const textResponse = await resp.text(); let rawBootData;