diff --git a/src/webui/daemon-server.ts b/src/webui/daemon-server.ts index 56e3511..6c50431 100644 --- a/src/webui/daemon-server.ts +++ b/src/webui/daemon-server.ts @@ -9,10 +9,13 @@ import { randomBytes } from "crypto"; import express from "express"; import { loadChallengesIntoPKC } from "../challenge-packages/challenge-utils.js"; +const rootHashRedirectScriptPattern = + /]*>(?:(?!<\/script>)[\s\S])*?window\.location\.replace\(["']\/#["']\s*\+\s*window\.location\.pathname\s*\+\s*window\.location\.search\);(?:(?!<\/script>)[\s\S])*?<\/script>/; + async function _generateModifiedIndexHtmlWithRpcSettings(webuiPath: string, webuiName: string, ipfsGatewayPort: number) { const indexHtmlString = (await fs.readFile(path.join(webuiPath, "index_backup_no_rpc.html"))) .toString() - .replace(/