headers
Browse files7 unmodified lines89101112137 unmodified lines// Create response with headersconst response = NextResponse.next({ headers });// Add cache control for better performanceif (request.nextUrl.pathname.startsWith('/_next/static')) {response.headers.set('Cache-Control', 'public, max-age=31536000, immutable');7 unmodified lines891011121314151617181920217 unmodified lines// Create response with headersconst response = NextResponse.next({ headers });// Add SEO and security headers// Only set X-Frame-Options for non-HF spaces domainsif (!request.nextUrl.host.includes('hf.space')) {response.headers.set('X-Frame-Options', 'SAMEORIGIN');}response.headers.set('X-Content-Type-Options', 'nosniff');response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');// Add cache control for better performanceif (request.nextUrl.pathname.startsWith('/_next/static')) {response.headers.set('Cache-Control', 'public, max-age=31536000, immutable');
middleware.ts+8