From bb88704671addaa09f7e50c7a58e9bf53a927cb9 Mon Sep 17 00:00:00 2001 From: Taylor Hanayik Date: Wed, 22 May 2024 08:13:15 +0100 Subject: [PATCH] Fix rootURL assignment in main.js --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5374742..c69c0b4 100644 --- a/main.js +++ b/main.js @@ -94,7 +94,10 @@ async function main() { await ensureConformed() const model = inferenceModelsList[this.selectedIndex] const opts = brainChopOpts - opts.rootURL = location.href + // opts.rootURL should be the url without the query string + const urlParams = new URL(window.location.href) + // remove the query string + opts.rootURL = urlParams.origin + urlParams.pathname const isLocalhost = Boolean( window.location.hostname === 'localhost' || // [::1] is the IPv6 localhost address.