mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
@@ -17,6 +17,7 @@ const PRESERVED_ROUTES = [
|
|||||||
'/guide',
|
'/guide',
|
||||||
'/services',
|
'/services',
|
||||||
'/go/',
|
'/go/',
|
||||||
|
'/packages/',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,9 +105,6 @@ export function middleware(request: NextRequest) {
|
|||||||
} else if (PRESERVED_ROUTES.some((r) => pathname.startsWith(r))) {
|
} else if (PRESERVED_ROUTES.some((r) => pathname.startsWith(r))) {
|
||||||
// On hard refresh of a preserved route, let it through.
|
// On hard refresh of a preserved route, let it through.
|
||||||
response = render();
|
response = render();
|
||||||
} else if (isHardRefresh && pathname.startsWith('/packages')) {
|
|
||||||
// On hard refresh of package detail or packages list, redirect to home.
|
|
||||||
response = NextResponse.redirect(new URL('/', request.url));
|
|
||||||
} else {
|
} else {
|
||||||
response = render();
|
response = render();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user