headers
Browse files9 unmodified lines10111213141516171819209 unmodified lines// Add SEO and security headers// Only set X-Frame-Options for non-HF spaces domainsif (!request.nextUrl.host.includes('hf.space') && !request.nextUrl.host.includes('huggingface.co') && !request.nextUrl.host.includes('hf.co')) {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')) {9 unmodified lines10111213141516171819209 unmodified lines// Add SEO and security headers// Only set X-Frame-Options for non-HF spaces domains// if (!request.nextUrl.host.includes('hf.space') && !request.nextUrl.host.includes('huggingface.co') && !request.nextUrl.host.includes('hf.co')) {// 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')) {
middleware.ts+5-5