Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rtdb): enable support for firebasedatabase.app #423

Merged
merged 4 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove static URL check
  • Loading branch information
thameezb committed Apr 27, 2021
commit 9c436d492f0fcf2509901d53e95765988e11c970
2 changes: 0 additions & 2 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ func NewClient(ctx context.Context, c *internal.DatabaseConfig) (*Client, error)
return nil, err
} else if p.Scheme != "https" {
return nil, fmt.Errorf("invalid database URL: %q; want scheme: %q", c.URL, "https")
} else if !(strings.HasSuffix(p.Host, ".firebaseio.com") || strings.HasSuffix(p.Host, ".firebasedatabase.app")) {
return nil, fmt.Errorf("invalid database URL: %q; want host: %q or %q", c.URL, "firebaseio.com", ".firebasedatabase.app")
}

var ao []byte
Expand Down
2 changes: 1 addition & 1 deletion db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestInvalidURL(t *testing.T) {
"",
"foo",
"http://db.firebaseio.com",
"https://firebase.google.com",
"http://firebase.google.com",
}
for _, tc := range cases {
c, err := NewClient(context.Background(), &internal.DatabaseConfig{
Expand Down