-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathnetlify.toml
More file actions
198 lines (168 loc) · 6.72 KB
/
netlify.toml
File metadata and controls
198 lines (168 loc) · 6.72 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Netlify configuration for TanStack Start SSR deployment
[build]
command = "pnpm build"
publish = "dist/client"
[build.environment]
NODE_VERSION = "24"
# Headers for security and caching
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "geolocation=(), microphone=(), camera=(), usb=(), payment=()"
X-XSS-Protection = "1; mode=block"
# RFC 8288 Link headers — advertise well-known agent-discovery resources.
# Kept in sync with /.well-known/api-catalog, /.well-known/agent-skills/index.json,
# /.well-known/mcp/server-card.json, and the LLM reference docs under /llms.txt
# and /llms-full.txt.
Link = '''</.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json", </.well-known/agent-skills/index.json>; rel="https://agentskills.io/rel/index"; type="application/json", </.well-known/mcp/server-card.json>; rel="service-desc"; type="application/json"; title="MCP Server Card", </llms.txt>; rel="alternate"; type="text/plain"; title="LLM Documentation (Summary)", </llms-full.txt>; rel="alternate"; type="text/plain"; title="LLM Documentation (Full)", </sitemap.xml>; rel="sitemap"; type="application/xml"'''
# Homepage discovery headers. Keep Link in this exact-route block so agents
# scanning `/` can discover resources even when hosting merges only the most
# specific header rule.
[[headers]]
for = "/"
[headers.values]
Vary = "Accept"
Link = '''</.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json", </.well-known/agent-skills/index.json>; rel="https://agentskills.io/rel/index"; type="application/json", </.well-known/mcp/server-card.json>; rel="service-desc"; type="application/json"; title="MCP Server Card", </llms.txt>; rel="alternate"; type="text/plain"; title="LLM Documentation (Summary)", </llms-full.txt>; rel="alternate"; type="text/plain"; title="LLM Documentation (Full)", </sitemap.xml>; rel="sitemap"; type="application/xml"'''
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/*.svg"
[headers.values]
Cache-Control = "public, max-age=86400"
[[headers]]
for = "/*.png"
[headers.values]
Cache-Control = "public, max-age=86400"
[[headers]]
for = "/*.ico"
[headers.values]
Cache-Control = "public, max-age=86400"
# PWA Service Worker - must not be cached to ensure updates are received
[[headers]]
for = "/sw.js"
[headers.values]
Cache-Control = "no-cache, no-store, must-revalidate"
Service-Worker-Allowed = "/"
[[headers]]
for = "/workbox-*.js"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# PWA Manifest
[[headers]]
for = "/manifest.webmanifest"
[headers.values]
Cache-Control = "public, max-age=86400"
Content-Type = "application/manifest+json"
[[headers]]
for = "/manifest.json"
[headers.values]
Cache-Control = "public, max-age=86400"
Content-Type = "application/manifest+json"
# LLM discovery files
[[headers]]
for = "/llms.txt"
[headers.values]
Cache-Control = "public, max-age=86400"
Content-Type = "text/plain; charset=utf-8"
X-Robots-Tag = "noarchive"
[[headers]]
for = "/llms-full.txt"
[headers.values]
Cache-Control = "public, max-age=86400"
Content-Type = "text/plain; charset=utf-8"
X-Robots-Tag = "noarchive"
# Sitemap
[[headers]]
for = "/sitemap.xml"
[headers.values]
Cache-Control = "public, max-age=3600"
Content-Type = "application/xml; charset=utf-8"
# Robots
[[headers]]
for = "/robots.txt"
[headers.values]
Cache-Control = "public, max-age=86400"
Content-Type = "text/plain; charset=utf-8"
# Well-known: API catalog (RFC 9727)
[[headers]]
for = "/.well-known/api-catalog"
[headers.values]
Cache-Control = "public, max-age=3600"
Content-Type = "application/linkset+json"
Access-Control-Allow-Origin = "*"
# Well-known: Agent Skills discovery index
[[headers]]
for = "/.well-known/agent-skills/index.json"
[headers.values]
Cache-Control = "public, max-age=3600"
Content-Type = "application/json; charset=utf-8"
Access-Control-Allow-Origin = "*"
# Well-known: MCP Server Card (SEP-1649 / SEP-2127 draft)
[[headers]]
for = "/.well-known/mcp/server-card.json"
[headers.values]
Cache-Control = "public, max-age=3600"
Content-Type = "application/json; charset=utf-8"
Access-Control-Allow-Origin = "*"
# Environment variable configuration
# VITE_NETLIFY_CONTEXT is baked into the client bundle at build time so that
# client-side code can identify the deploy context without relying on runtime
# environment variables. API keys are suppressed for preview and branch-deploy
# contexts because the keys are not scoped to those deployment URLs.
[context.production.environment]
NODE_ENV = "production"
VITE_NETLIFY_CONTEXT = "production"
[context.deploy-preview.environment]
NODE_ENV = "production"
VITE_NETLIFY_CONTEXT = "deploy-preview"
[context.branch-deploy.environment]
NODE_ENV = "production"
VITE_NETLIFY_CONTEXT = "branch-deploy"
# Redirects for old subdomain-based URLs (2022 format) to new query parameter format
# These ensure backward compatibility for old bookmarks and links
# Old format: https://explorer.{network}.aptos.dev/path
# New format: https://explorer.aptoslabs.com/path?network={network}
# Redirect from explorer.devnet.aptos.dev to explorer.aptoslabs.com with network=devnet
[[redirects]]
from = "https://explorer.devnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=devnet"
status = 301
force = true
[[redirects]]
from = "https://devnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=devnet"
status = 301
force = true
# Redirect from explorer.testnet.aptos.dev to explorer.aptoslabs.com with network=testnet
[[redirects]]
from = "https://explorer.testnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=testnet"
status = 301
force = true
[[redirects]]
from = "https://testnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=testnet"
status = 301
force = true
# Redirect from explorer.mainnet.aptos.dev to explorer.aptoslabs.com with network=mainnet
[[redirects]]
from = "https://explorer.mainnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=mainnet"
status = 301
force = true
[[redirects]]
from = "https://mainnet.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=mainnet"
status = 301
force = true
# Redirect from explorer.aptos.dev (without network subdomain) to mainnet
[[redirects]]
from = "https://explorer.aptos.dev/*"
to = "https://explorer.aptoslabs.com/:splat?network=mainnet"
status = 301
force = true