From de950bb35d372d85df334882f96ba5c65679d8ea Mon Sep 17 00:00:00 2001 From: Rafal Dziegielewski Date: Tue, 28 Mar 2023 11:55:04 +0200 Subject: [PATCH] fix: serve components.bundle.js publicly --- src/authentication/protected-routes.handler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/authentication/protected-routes.handler.ts b/src/authentication/protected-routes.handler.ts index 7331107..b98dad7 100644 --- a/src/authentication/protected-routes.handler.ts +++ b/src/authentication/protected-routes.handler.ts @@ -10,6 +10,8 @@ export const withProtectedRoutesHandler = ( fastifyApp.addHook('preHandler', async (request, reply) => { if (AdminRouter.assets.find((asset) => request.url.match(asset.path))) { return; + } else if (AdminRouter.routes.find((r) => r.action === 'bundleComponents')) { + return; } else if ( !request.url.startsWith(rootPath) || request.session.get('adminUser') ||