-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathnetlify.toml
More file actions
90 lines (75 loc) · 2.88 KB
/
netlify.toml
File metadata and controls
90 lines (75 loc) · 2.88 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
[build]
command = "pnpm run build"
publish = "dist"
[build.environment]
NODE_OPTIONS = "--max_old_space_size=6144"
[functions]
directory = "netlify/functions"
# Bundles Functions 1.x with esbuild. The SSR function (Functions 2.0) is
# bundled separately by the Netlify adapter and is not affected by this setting.
node_bundler = "esbuild"
# Local dev: same as `pnpm run start` — `NETLIFY_DEV=1 astro dev` on port 4321.
# Declare `command` + `targetPort` so Netlify Dev matches astro.config server settings.
[dev]
command = "pnpm run start"
targetPort = 4321
[[edge_functions]]
path = "/*"
function = "track-agents"
# Astro emits content-hashed filenames for all JS/CSS bundles — safe to cache permanently.
# The hash changes whenever content changes, so immutable is correct here.
[[headers]]
for = "/_astro/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# LLM index files — 1h fresh, 24h stale. All four rules below are intentionally identical;
# Netlify TOML requires a separate [[headers]] block per path pattern.
[[headers]]
for = "/llms.txt"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
[[headers]]
for = "/llms-full.txt"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
[[headers]]
for = "/llms-small.txt"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
[[headers]]
for = "/_llms-txt/*"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
# API catalog: cacheable for 1 hour
[[headers]]
for = "/.well-known/api-catalog"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
Content-Type = "application/linkset+json"
# MCP Server Card
[[headers]]
for = "/.well-known/mcp/server-card.json"
[headers.values]
Content-Type = "application/json"
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
# Web Bot Auth JWKS directory
[[headers]]
for = "/.well-known/http-message-signatures-directory"
[headers.values]
Content-Type = "application/http-message-signatures-directory+json"
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"
# Sitemap: cacheable for 1 day
[[headers]]
for = "/sitemap*.xml"
[headers.values]
Cache-Control = "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800"
# OpenAPI/Postman JSON specs: 1 day cache
[[headers]]
for = "/api/*.json"
[headers.values]
Cache-Control = "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800"
# Markdown API reference: 1 hour (generated from spec)
[[headers]]
for = "/apis.md"
[headers.values]
Cache-Control = "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400"