Skip to content

Commit

Permalink
Fix fetchRequest implementation does not add 'rnd' query parameter so…
Browse files Browse the repository at this point in the history
… some HTTP requests get cached in browser

Resolves #1843
  • Loading branch information
VeskeR committed Sep 6, 2024
1 parent bd66293 commit b81d597
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/platform/web/lib/http/request/fetchrequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export default async function fetchRequest(

const resultPromise = (async (): Promise<RequestResult> => {
try {
const res = await Utils.getGlobalObject().fetch(uri + '?' + new URLSearchParams(params || {}), requestInit);
const urlParams = new URLSearchParams(params || {});
urlParams.set('rnd', Utils.cheapRandStr());
const preparedURI = uri + '?' + urlParams;
const res = await Utils.getGlobalObject().fetch(preparedURI, requestInit);

clearTimeout(timeout!);

Expand Down

0 comments on commit b81d597

Please sign in to comment.