Repository navigation
Expand file tree
/
Copy pathfirebase.json
More file actions
179 lines (179 loc) · 6.74 KB
/
Copy pathfirebase.json
File metadata and controls
179 lines (179 loc) · 6.74 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
{
"hosting": {
"//": "The deploy names a target rather than a site: `firebase deploy --only hosting:prod`. Without this key that target resolves to nothing and the deploy stops with \"Hosting site or target prod not detected\". `.firebaserc` maps prod to the usefiretower-prod site.",
"target": "prod",
"public": "out",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"cleanUrls": true,
"trailingSlash": false,
"redirects": [
{
"//": "The control-plane installer: Docker and Node if missing, the CLI, then firetower install. Same rolling release as the worker's script.",
"source": "/install.sh",
"destination": "https://github.com/firetower-cloud/firetower/releases/download/worker-latest/install.sh",
"type": 302
},
{
"//": "The worker installer. The script is a release asset of the firetower repository, on a rolling `worker-latest` release the release job keeps current \u2014 GitHub's own `latest` is whichever package released last. The site holds no copy, so it can never be out of step with the binaries the script downloads.",
"source": "/worker.sh",
"destination": "https://github.com/firetower-cloud/firetower/releases/download/worker-latest/worker.sh",
"type": 302
},
{
"//": "The docs moved under /docs/self-hosting when the cloud option appeared, and split again into install and upgrade. A redirect is one line; a 404 in somebody's bookmark is not. Next's own redirects() cannot do this \u2014 an export has no server to run it.",
"source": "/docs/self-host",
"destination": "/docs/self-hosting",
"type": 301
},
{
"source": "/docs/install",
"destination": "/docs/self-hosting/app/install",
"type": 301
},
{
"//": "The domain page is gone: the certificate, the records and the two ways to be reached are all on the install page now, which is where somebody following /docs/domain wanted to end up anyway.",
"source": "/docs/domain",
"destination": "/docs/self-hosting/app/install",
"type": 301
},
{
"source": "/docs/self-hosting/domain",
"destination": "/docs/self-hosting/app/install",
"type": 301
},
{
"source": "/docs/hosts",
"destination": "/docs/self-hosting/machines/install",
"type": 301
},
{
"//": "Daily operations, Connect repositories and Secrets were all removed. Nothing replaces them one-for-one, so these land on the page that explains the parts rather than on a 404.",
"source": "/docs/operations",
"destination": "/docs/self-hosting",
"type": 301
},
{
"source": "/docs/self-hosting/operations",
"destination": "/docs/self-hosting",
"type": 301
},
{
"source": "/docs/repositories",
"destination": "/docs/self-hosting",
"type": 301
},
{
"source": "/docs/secrets",
"destination": "/docs/self-hosting",
"type": 301
},
{
"source": "/docs/self-hosting/install",
"destination": "/docs/self-hosting/app/install",
"type": 301
},
{
"source": "/docs/self-hosting/machines",
"destination": "/docs/self-hosting/machines/install",
"type": 301
},
{
"//": "The two upgrade pages became one Update page: upgrading is done on the Updates screen now, and splitting the deployment from the workers put the same screen on two pages.",
"source": "/docs/self-hosting/app/upgrade",
"destination": "/docs/update",
"type": 301
},
{
"source": "/docs/self-hosting/machines/upgrade",
"destination": "/docs/update",
"type": 301
}
],
"headers": [
{
"//": "Next's metadata routes emit real PNGs with no file extension, so Hosting would serve them as application/octet-stream and every social preview would break. Set the type explicitly. The URLs carry a build hash, so they are safe to cache forever.",
"source": "/@(opengraph-image|apple-icon|icon)",
"headers": [
{
"key": "Content-Type",
"value": "image/png"
},
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"//": "Next fingerprints everything under _next/static, so these URLs can never change contents.",
"source": "/_next/static/**",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"//": "Fonts and extension-bearing images are content-addressed by the build too.",
"source": "**/*.@(woff|woff2|ttf|otf|eot|png|jpg|jpeg|gif|webp|avif|ico)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"//": "The demo recording. Nothing under public/ is fingerprinted by the build, so the cut number lives in the filename instead \u2014 re-cutting the demo means publishing demo-1.0.* and pointing DemoVideo.tsx at it, never overwriting these bytes. Accept-Ranges so the browser can seek without refetching the file.",
"source": "**/*.@(mp4|webm)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
},
{
"key": "Accept-Ranges",
"value": "bytes"
}
]
},
{
"//": "HTML and the metadata text files must revalidate, or a deploy would not be visible until caches expire.",
"source": "**/*.@(html|xml|txt|webmanifest|svg)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=0, must-revalidate"
}
]
},
{
"//": "Baseline hardening. Google Analytics is the only cross-origin thing the site loads, and none of these headers touch it \u2014 there is deliberately no CSP here, because adding one that forgets googletagmanager.com breaks measurement silently.",
"source": "**",
"headers": [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=31536000; includeSubDomains"
}
]
}
]
}
}