Repository navigation
Expand file tree
/
Copy pathfirebase.json
More file actions
132 lines (132 loc) · 4.55 KB
/
Copy pathfirebase.json
File metadata and controls
132 lines (132 loc) · 4.55 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
{
"flutter": {
"platforms": {
"android": {
"default": {
"projectId": "zs-auth-app",
"appId": "1:18736676875:android:29ce1b60c5a33d3d87870e",
"fileOutput": "android/app/google-services.json"
}
},
"dart": {
"lib/firebase_options.dart": {
"projectId": "zs-auth-app",
"configurations": {
"android": "1:18736676875:android:29ce1b60c5a33d3d87870e",
"ios": "1:18736676875:ios:5edcdd1ea9a7393787870e",
"macos": "1:18736676875:ios:5edcdd1ea9a7393787870e",
"web": "1:18736676875:web:81e99c4b04da97fe87870e",
"windows": "1:18736676875:web:9f70ad50fdc41c5887870e"
}
}
}
}
},
"hosting": {
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*"
],
"frameworksBackend": {
"region": "europe-west1"
},
/* ───────────── Self-hosted backend for email verification ─────────── */
"redirects": [
{
"source": "/verify-email",
"destination": "https://auth-demo-api.dmitrii.app/verify-email",
"type": 307
},
/* ───────────── /verify-email/something ─────────── */
{
"source": "/verify-email/:path*",
"destination": "https://auth-demo-api.dmitrii.app/verify-email/:path*",
"type": 307
}
],
"rewrites": [
/* ───────────── Cloud Run backend for email verification
{
"source": "/verify-email{,/**}",
"run": {
"serviceId": "auth-app-api",
"region": "europe-west1",
"pinTag": false
}
},*/
{
"source": "**",
"destination": "/index.html"
}
],
// ── Cache-Control policy ──────────────────────────────────────────
// The Service Worker generated by `sw: ^0.1.2` owns all caching:
// it precaches Core/Required resources with MD5-versioned URLs and
// lazy-caches Optional assets. The HTTP layer must therefore stay
// out of the way — a single `Cache-Control: no-cache` on every path
// lets browsers keep files on disk but forces a conditional GET on
// each load (Firebase replies with 304 when unchanged).
//
// Why a blanket rule rather than per-file no-cache + per-extension
// wildcards:
// - Firebase applies matching `headers` entries top-to-bottom and
// the last match wins for a given key. A trailing wildcard on
// js/wasm/json extensions therefore silently overrode the
// explicit no-cache on /bootstrap.js, /sw.js, /version.json.
// - Flutter's `--tree-shake-icons` (see deploy/build_flutter_web.sh)
// mutates MaterialIcons-Regular.otf between builds while keeping
// its filename stable — URL-cache-busting does not exist for it,
// so an HTTP-level `max-age` would be unsafe. The SW manifest
// fingerprints every asset by content hash and handles staleness.
//
// See packages/sw README (DoctorinaAI/service-worker-generator) for
// the reference server config this mirrors.
"headers": [
{
"source": "**",
"headers": [
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "no-referrer"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=31536000; includeSubDomains; preload"
},
/* ───────────── Enable WASM multithreading (SharedArrayBuffer) ─────────── */
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
},
/* ───────────── Enable WASM multithreading (SharedArrayBuffer) ─────────── */
{
"key": "Cache-Control",
"value": "no-cache"
}
]
},
{
"source": "**/*.@(eot|otf|ttf|ttc|woff|woff2|font.css)",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
}
]
}
}