Skip to content

Commit

Permalink
fix: serve components.bundle.js publicly
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Mar 28, 2023
1 parent ce3371b commit 31bf16e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ const addAdminJsAuthRoutes = (admin: AdminJS, router: Router, auth: KoaAuthOptio

if (AdminJSRouter.assets.find((asset) => ctx.request.originalUrl.match(asset.path))) {
await next()
} else if (AdminJSRouter.routes.find((r) => r.action === 'bundleComponents')) {
await next()
} else if (ctx.session.adminUser) {
await next()
} else {
Expand Down

0 comments on commit 31bf16e

Please sign in to comment.