Spaces:
Running
Running
| import type { NextConfig } from "next"; | |
| const contentSecurityPolicy = [ | |
| "default-src 'self'", | |
| "script-src 'self' 'unsafe-inline' 'unsafe-eval'", | |
| "style-src 'self' 'unsafe-inline'", | |
| "img-src 'self' data: https:", | |
| "font-src 'self' https://fonts.gstatic.com", | |
| "connect-src 'self'", | |
| "frame-ancestors 'self' https://huggingface.co https://*.huggingface.co https://*.hf.space", | |
| ].join("; "); | |
| const nextConfig: NextConfig = { | |
| async headers() { | |
| return [ | |
| { | |
| source: "/(.*)", | |
| headers: [ | |
| { | |
| key: "Content-Security-Policy", | |
| value: contentSecurityPolicy, | |
| }, | |
| { | |
| key: "Referrer-Policy", | |
| value: "strict-origin-when-cross-origin", | |
| }, | |
| ], | |
| }, | |
| ]; | |
| }, | |
| }; | |
| export default nextConfig; | |