diff --git a/core/core-frontend/flushbonading/index.js b/core/core-frontend/flushbonading/index.js index f53b354c67..157407886a 100644 --- a/core/core-frontend/flushbonading/index.js +++ b/core/core-frontend/flushbonading/index.js @@ -99,6 +99,10 @@ htmlStream.pipe(parserStream).on('finish', () => { } if (url.includes(suffix)) { prefix = new URL(url).origin + const index = url.indexOf(\`/js/div_import_${suffix}\`) + if (index > 0) { + prefix = url.substring(0, index) + } return true } } diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 8d1a392fb4..4c2ac81423 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -37,6 +37,10 @@ const getPrefix = (): string => { } if (url.includes(suffix)) { prefix = new URL(url).origin + const index = url.indexOf(`/js/div_import_${suffix}`) + if (index > 0) { + prefix = url.substring(0, index) + } return true } }