Skip to content

Commit c43dca5

Browse files
committed
fix(webapp): match the asset pathname, not the full URL, in stale-asset recovery
A query string or third-party URL containing /assets/ must not trigger a reload and burn the recovery budget.
1 parent 188a984 commit c43dca5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/webapp/app/components/StaleAssetRecovery.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ export function staleAssetRecoveryScript() {
6262
: el.tagName === "SCRIPT"
6363
? (el as HTMLScriptElement).src
6464
: null;
65-
if (url && url.indexOf("/assets/") !== -1) recover();
65+
// Match the pathname, not the full URL — a query string or third-party
66+
// URL containing /assets/ must not burn the reload budget.
67+
if (url && new URL(url, location.href).pathname.indexOf("/assets/") !== -1) recover();
6668
},
6769
true
6870
);

0 commit comments

Comments
 (0)