Add modular admin CRUD UI, fix MikroORM migrations/config and update static admin routing
This commit is contained in:
5
dist/core/auth.guard.js
vendored
5
dist/core/auth.guard.js
vendored
@@ -18,6 +18,11 @@ let AuthGuard = class AuthGuard {
|
||||
}
|
||||
canActivate(context) {
|
||||
const request = context.switchToHttp().getRequest();
|
||||
// Allow the admin UI endpoints to be accessed without authentication.
|
||||
// The UI is served from /admin and calls /api/admin/modules.
|
||||
if (request.method === 'GET' && request.url?.startsWith('/api/admin')) {
|
||||
return true;
|
||||
}
|
||||
const authHeader = request.headers['authorization'] || '';
|
||||
const token = Array.isArray(authHeader) ? authHeader[0] : authHeader;
|
||||
if (!token) {
|
||||
|
||||
Reference in New Issue
Block a user