diff --git a/webui/src/page/ServerProfilePage.tsx b/webui/src/page/ServerProfilePage.tsx index 91ecdb0..834e3c8 100644 --- a/webui/src/page/ServerProfilePage.tsx +++ b/webui/src/page/ServerProfilePage.tsx @@ -148,8 +148,9 @@ const Page: Component = () => { ) } - const resolved = (new URL(path, window.location.origin)).pathname - if (!resolved.startsWith(profileRoot)) { + const resolved = new URL(path, indexUrl).pathname + const profileRootPath = new URL(profileRoot).pathname + if (!resolved.startsWith(profileRootPath)) { return (
Profile contains invalid paths.