Spaces:
Sleeping
Sleeping
Caner Giden commited on
Commit ·
bcaf76c
1
Parent(s): c38e534
Disable CSP headers and fix Dockerfile CMD for HuggingFace Spaces
Browse filesFiles changed (2)
- Dockerfile+2-1
- next.config.js+22-22
36 unmodified lines3738394036 unmodified linesEXPOSE 7860# Next.js prod server'ı HF portunda çalıştırCMD ["npx", "next", "start", "-p", "7860", "-H", "0.0.0.0"]36 unmodified lines373839404136 unmodified linesEXPOSE 7860# Next.js prod server'ı HF portunda çalıştır# PORT ve HOSTNAME environment variable'larını kullanCMD ["sh", "-c", "next start -p ${PORT:-7860} -H ${HOSTNAME:-0.0.0.0}"]
12345678910111213141516171819202122232425262728/** @type {import('next').NextConfig} */const nextConfig = {reactStrictMode: true,// CSP headers - development için daha esnek ayarlarasync headers() {return [{source: '/:path*',headers: [{key: 'Content-Security-Policy',value: ["default-src 'self'","script-src 'self' 'unsafe-eval' 'unsafe-inline'", // Production için de gerekli (Next.js)"style-src 'self' 'unsafe-inline'","img-src 'self' data: https:","font-src 'self' data:","connect-src 'self' https://flowmind-ai-flowmind-core-api.hf.space https://*.hf.space","frame-ancestors 'self' https://*.hf.space",].join('; '),},],},];},}module.exports = nextConfig12345678910111213141516171819202122232425262728/** @type {import('next').NextConfig} */const nextConfig = {reactStrictMode: true,// CSP headers - HuggingFace Spaces için geçici olarak devre dışı// async headers() {// return [// {// source: '/:path*',// headers: [// {// key: 'Content-Security-Policy',// value: [// "default-src 'self'",// "script-src 'self' 'unsafe-eval' 'unsafe-inline'",// "style-src 'self' 'unsafe-inline'",// "img-src 'self' data: https:",// "font-src 'self' data:",// "connect-src 'self' https://flowmind-ai-flowmind-core-api.hf.space https://*.hf.space",// "frame-ancestors 'self' https://*.hf.space",// ].join('; '),// },// ],// },// ];// },}module.exports = nextConfig
Dockerfile+2-1
next.config.js+22-22