-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecurity-rules.txt
More file actions
69 lines (59 loc) · 1.53 KB
/
Copy pathsecurity-rules.txt
File metadata and controls
69 lines (59 loc) · 1.53 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
// Firestore 安全规则
// 在 Firebase Console > Firestore Database > Rules 中更新
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// 允许所有用户读写测试集合(仅用于测试)
match /messages/{document=**} {
allow read, write: if true;
}
match /testLatency/{document=**} {
allow read, write: if true;
}
match /clientTestLatency/{document=**} {
allow read, write: if true;
}
match /serverTestLatency/{document=**} {
allow read, write: if true;
}
match /realtimeTest/{document=**} {
allow read, write: if true;
}
match /firestoreTest/{document=**} {
allow read, write: if true;
}
match /realtimeDbTest/{document=**} {
allow read, write: if true;
}
}
}
// Realtime Database 安全规则
// 在 Firebase Console > Realtime Database > Rules 中更新
{
"rules": {
".read": true,
".write": true,
"serverTestLatency": {
".read": true,
".write": true
},
"realtimeTest": {
".read": true,
".write": true
},
"firestoreTest": {
".read": true,
".write": true
},
"realtimeDbTest": {
".read": true,
".write": true
}
}
}
// 注意:这些规则仅用于测试环境!
// 在生产环境中,请使用更严格的安全规则:
// - 限制只有经过身份验证的用户可以访问
// - 限制用户只能访问自己的数据
// - 验证数据格式和内容
// - 设置速率限制