enzostvs HF Staff commited on
Commit
9defc5a
·
1 Parent(s): bff70f1
Files changed (1) hide show
  1. middleware.ts +5 -5
middleware.ts CHANGED
@@ -10,11 +10,11 @@ export function middleware(request: NextRequest) {
10
 
11
  // Add SEO and security headers
12
  // Only set X-Frame-Options for non-HF spaces domains
13
- if (!request.nextUrl.host.includes('hf.space') && !request.nextUrl.host.includes('huggingface.co') && !request.nextUrl.host.includes('hf.co')) {
14
- response.headers.set('X-Frame-Options', 'SAMEORIGIN');
15
- }
16
- response.headers.set('X-Content-Type-Options', 'nosniff');
17
- response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');
18
 
19
  // Add cache control for better performance
20
  if (request.nextUrl.pathname.startsWith('/_next/static')) {
 
10
 
11
  // Add SEO and security headers
12
  // Only set X-Frame-Options for non-HF spaces domains
13
+ // if (!request.nextUrl.host.includes('hf.space') && !request.nextUrl.host.includes('huggingface.co') && !request.nextUrl.host.includes('hf.co')) {
14
+ // response.headers.set('X-Frame-Options', 'SAMEORIGIN');
15
+ // }
16
+ // response.headers.set('X-Content-Type-Options', 'nosniff');
17
+ // response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin');
18
 
19
  // Add cache control for better performance
20
  if (request.nextUrl.pathname.startsWith('/_next/static')) {