Files
klz-cables.com/.pnpm-store/v10/files/c3/916aea99db12cb1c60dd8aae3f82639ea30bb6d4186443bcd2b859714da4f54f2ef154c17c104b8f3f9724cb3f1b7da690214167fd3f91ae2be0e11ae0b4ff
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

25 lines
814 B
Plaintext

import { getRouteWithoutAdmin } from './getRouteWithoutAdmin.js';
// Routes that require admin authentication
const publicAdminRoutes = ['createFirstUser', 'forgot', 'login', 'logout', 'forgot', 'inactivity', 'unauthorized', 'reset'];
export const isPublicAdminRoute = ({
adminRoute,
config,
route
}) => {
const isPublicAdminRoute = publicAdminRoutes.some(routeSegment => {
const segment = config.admin?.routes?.[routeSegment] || routeSegment;
const routeWithoutAdmin = getRouteWithoutAdmin({
adminRoute,
route
});
if (routeWithoutAdmin.startsWith(segment)) {
return true;
} else if (routeWithoutAdmin.includes('/verify/')) {
return true;
} else {
return false;
}
});
return isPublicAdminRoute;
};
//# sourceMappingURL=isPublicAdminRoute.js.map