PHP 8.2.30
Preview: protected-routes.handler.js Size: 372 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/@adminjs/express/lib/authentication/protected-routes.handler.js

export const withProtectedRoutesHandler = (router, admin) => {
    const { loginPath } = admin.options;
    const authorizedRoutesMiddleware = (request, response, next) => {
        if (!request.session || !request.session.adminUser) {
            return response.redirect(loginPath);
        }
        return next();
    };
    router.use(authorizedRoutesMiddleware);
};

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
226 B lrw-r--r-- 2026-02-28 00:29:02
Edit Download
4.41 KB lrw-r--r-- 2026-02-28 00:28:08
Edit Download
222 B lrw-r--r-- 2026-02-28 00:29:06
Edit Download
838 B lrw-r--r-- 2026-02-28 00:28:14
Edit Download
156 B lrw-r--r-- 2026-02-28 00:29:08
Edit Download
372 B lrw-r--r-- 2026-02-28 00:28:18
Edit Download
223 B lrw-r--r-- 2026-02-28 00:29:10
Edit Download
1.45 KB lrw-r--r-- 2026-02-28 00:28:22
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).