Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

Commit 6bee8ba

Browse files
committed
Updates firebase hosting rules
1 parent 79716c0 commit 6bee8ba

3 files changed

Lines changed: 47 additions & 8 deletions

File tree

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "devspace-app"
4+
}
5+
}

database.rules.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"rules": {
3+
"signups": {
4+
".write": true,
5+
".read": false
6+
},
7+
"users": {
8+
".write": "auth !== null && auth.provider === 'github'",
9+
".read": "auth !== null && auth.provider === 'github'",
10+
"$uid": {
11+
".read": "auth != null && auth.uid == $uid",
12+
".write": "auth != null && auth.uid == $uid"
13+
}
14+
},
15+
"v1": {
16+
"users": {
17+
".write": "auth !== null && auth.provider === 'github'",
18+
".read": "auth !== null && auth.provider === 'github'",
19+
"$uid": {
20+
".read": "auth != null && auth.uid == $uid",
21+
".write": "auth != null && auth.uid == $uid"
22+
}
23+
},
24+
"signups": {
25+
".write": true,
26+
".read": false
27+
}
28+
}
29+
}
30+
}

firebase.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
2-
"firebase": "devspace-app",
3-
"public": "dist",
4-
"ignore": [
5-
"firebase.json",
6-
"**/.*",
7-
"**/dist/**",
8-
"**/node_modules/**"
9-
]
2+
"database": {
3+
"rules": "database.rules.json"
4+
},
5+
"hosting": {
6+
"public": "dist",
7+
"rewrites": [
8+
{
9+
"source": "**",
10+
"destination": "/index.html"
11+
}
12+
]
13+
}
1014
}

0 commit comments

Comments
 (0)