-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
93 lines (76 loc) · 2.28 KB
/
netlify.toml
File metadata and controls
93 lines (76 loc) · 2.28 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
[[plugins]]
package = "netlify-plugin-flutter"
[plugins.inputs]
channel = "stable" # or "beta" if you really want that
[build]
command = """flutter pub get && \
flutter build web --release --pwa-strategy=offline-first && \
mkdir -p build/web/.well-known && \
cp -f web/.well-known/assetlinks.json build/web/.well-known/assetlinks.json"""
publish = "build/web"
[build.environment]
PUB_CACHE = "/opt/buildhome/.pub-cache"
# Cache policy: keep index fresh, fingerprinted assets long-lived
[[headers]]
for = "/index.html"
[headers.values]
Cache-Control = "no-cache"
[[headers]]
for = "/*.drill"
[headers.values]
Content-Type = "application/vnd.ringdrill+zip"
Content-Disposition = "attachment"
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/canvaskit/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/main.dart.js"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/flutter_service_worker.js"
[headers.values]
Cache-Control = "no-cache"
[functions]
directory = "netlify/functions"
[[redirects]]
from = "/api/drills/upload"
to = "/.netlify/functions/drills-upload"
status = 200
[[redirects]]
from = "/api/drills/head/*"
to = "/.netlify/functions/drills-head/:splat"
status = 200
[[redirects]]
from = "/d/*"
to = "/.netlify/functions/deep-link/:splat"
status = 200
[[redirects]]
from = "/api/market/feed"
to = "/.netlify/functions/market-feed"
status = 200
[[redirects]]
from = "/api/admin"
to = "/.netlify/functions/drills-admin"
status = 200
# Serve .well-known files as-is (before the SPA catch-all)
[[redirects]]
from = "/.well-known/*"
to = "/.well-known/:splat"
status = 200
# Optional but recommended: ensure correct headers
[[headers]]
for = "/.well-known/assetlinks.json"
[headers.values]
Content-Type = "application/json; charset=utf-8"
Cache-Control = "public, max-age=3600"
# Single Page App routing: deep links -> index.html
[[redirects]]
from = "/*"
to = "/index.html"
status = 200