GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ui/proxy.ts at main · base/ui Expand file tree/ Copy pathproxy.tsMore file actions 24 lines (20 loc) · 1001 Bytes / Copy pathproxy.tsFile metadata and controls24 lines (20 loc) · 1001 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import { NextRequest, NextResponse } from 'next/server'; import { disabledRoutePrefixes } from './deploy.config.mjs'; export function proxy(req: NextRequest) { // Surfaces not shipped to this build target (deploy.config.mjs) 404 at the // edge. This is the authoritative status block: a disabled section's page may // be statically prerendered, so its layout notFound() serves 404 content with // a 200 status — enforcing the real 404 here, before the static asset is // served. Prefixes are build-time constant (target is inlined). const { pathname } = req.nextUrl; for (const prefix of disabledRoutePrefixes()) { if (pathname === prefix || pathname.startsWith(`${prefix}/`)) { return new NextResponse('Not Found', { status: 404 }); } } return NextResponse.next(); } // Match everything except the public API, Next internals, and static assets. export const config = { matcher: ['/((?!api/|_next/static|_next/image|favicon.ico|robots.txt|sitemap.xml).*)'], }; |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |