From 05314e25dc79b2918a6ae5f46afbbdb2de3f0aa3 Mon Sep 17 00:00:00 2001 From: Lyric <5h3ll3x@gmail.com> Date: Tue, 25 Jun 2024 12:24:04 +0900 Subject: [PATCH] chore: Forward root path and portal assets to Portal --- entry/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entry/index.js b/entry/index.js index afe2696e..498051e6 100644 --- a/entry/index.js +++ b/entry/index.js @@ -1,9 +1,9 @@ async function handleRequest(request, env) { const { host, pathname } = new URL(request.url); - // for the root path, forward to Portal + // for the root path and portal's assets, forward to Portal // for other paths, forward to VTP - if (pathname === '/') { + if (pathname === '/' || pathname.startsWith('/portal-assets') || pathname.startsWith('/portal-static')) { return forwardToPortal(request, env); } else { return forwardToVtp(request, env);