favicons and such

This commit is contained in:
Gavin McDonald
2025-05-09 09:30:54 -04:00
parent 2108324cf4
commit a15b80c23e
17 changed files with 54 additions and 0 deletions

25
middleware.ts Normal file
View File

@@ -0,0 +1,25 @@
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
export function middleware(request: NextRequest) {
const url = request.nextUrl;
const slug = url.pathname.slice(1);
const blocked = [
'apple-icon.png',
'favicon.ico',
'icon0.svg',
'icon1.png',
'manifest.json',
'opengraph-image.png',
'twitter-image.png',
'web-app-manifest-192x192.png',
'web-app-manifest-512x512.png',
];
if (blocked.includes(slug)) {
return NextResponse.rewrite(request.url);
}
return NextResponse.next();
}