8000 ten-framework/netlify.toml at netlify · hmmhmmhm/ten-framework · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
98 lines (80 loc) · 2.62 KB

netlify.toml

File metadata and controls

98 lines (80 loc) · 2.62 KB
[build]
base = "ai_agents/agents/examples/voice-assistant-live2d/frontend"
command = "pnpm run build"
publish = "out"
[functions]
# Disable functions to ensure static assets are served correctly
directory = "netlify/functions"
[[redirects]]
from = "/api/token/*"
to = "https://agent.theten.ai/api/token/:splat"
status = 200
force = true
[[redirects]]
from = "/api/agents/*"
to = "https://agent.theten.ai/api/agents/:splat"
status = 200
force = true
# Catch-all proxy for other API routes (start, stop, ping, etc.)
[[redirects]]
from = "/api/*"
to = "https://agent.theten.ai/api/:splat"
status = 200
force = true
[[redirects]]
from = "/models/*"
to = "https://ten-framework-assets.s3.amazonaws.com/live2d-models/:splat"
status = 200
force = true
[[redirects]]
from = "/live2d/models/*"
to = "https://ten-framework-assets.s3.amazonaws.com/live2d-models/:splat"
status = 200
force = true
# Serve the app at /live2d/ by rewriting to root index
[[redirects]]
from = "/live2d"
to = "/index.html"
status = 200
[[redirects]]
from = "/live2d/"
to = "/index.html"
status = 200
# Serve other /live2d/* files by rewriting to root
[[redirects]]
from = "/live2d/*"
to = "/:splat"
status = 200
# Redirect root to /live2d
[[redirects]]
from = "/"
to = "/live2d/"
status = 301
[[headers]]
for = "/api/*"
[headers.values]
Cache-Control = "no-store"
Access-Control-Allow-Origin = "https://ten-minimax.netlify.app"
Access-Control-Allow-Credentials = "true"
Access-Control-Allow-Methods = "GET, POST, OPTIONS"
Access-Control-Allow-Headers = "Content-Type, Authorization, Accept"
[[headers]]
for = "/*"
[headers.values]
Content-Security-Policy = "default-src 'self'; connect-src 'self' https://agent.theten.ai https://api.theten.ai https://ten-framework-assets.s3.amazonaws.com https://*.agora.io wss://*.agora.io; img-src 'self' data: blob: https://ten-framework-assets.s3.amazonaws.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' blob:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com;"
[[headers]]
for = "/lib/*.js"
[headers.values]
Content-Type = "application/javascript"
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/lib/*.json"
[headers.values]
Content-Type = "application/json"
Cache-Control = "public, max-age=31536000, immutable"
[context.production.environment]
NEXT_PUBLIC_API_BASE_URL = "/api/agents"
[context.deploy-preview.environment]
NEXT_PUBLIC_API_BASE_URL = ""
[context.branch-deploy.environment]
NEXT_PUBLIC_API_BASE_URL = ""
0