Skip to content

Commit

Permalink
chore: Forward root path and portal assets to Portal
Browse files Browse the repository at this point in the history
  • Loading branch information
lyricat committed Jun 25, 2024
1 parent 25544d2 commit 05314e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entry/index.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 05314e2

Please sign in to comment.