Tile windowing system
This commit is contained in:
parent
c6e6c5ca48
commit
43318fb8cd
35 changed files with 4659 additions and 360 deletions
|
|
@ -21,6 +21,15 @@ export function middleware(req: NextRequest) {
|
|||
return NextResponse.next();
|
||||
}
|
||||
|
||||
// Public routes — accessible without auth
|
||||
if (
|
||||
pathname === "/" ||
|
||||
pathname === "/analytics" ||
|
||||
((pathname === "/api/power" || pathname === "/api/stats" || pathname === "/api/power/history") && req.method === "GET")
|
||||
) {
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
// No token — redirect to login
|
||||
const token = req.cookies.get("token")?.value;
|
||||
if (!token) {
|
||||
|
|
@ -33,5 +42,5 @@ export function middleware(req: NextRequest) {
|
|||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
|
||||
matcher: ["/((?!_next/static|_next/image|favicon.ico|.*\\.svg|.*\\.png|.*\\.jpg|.*\\.ico).*)"],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue