forked from TEN-framework/ten-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
98 lines (80 loc) · 2.62 KB
/
Copy pathnetlify.toml
File metadata and controls
98 lines (80 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[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 = ""