chore: Forward root path and portal assets to Portal

This commit is contained in:
Lyric
2024-06-25 12:24:04 +09:00
parent 25544d288b
commit 05314e25dc

View File

@@ -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);