-
Notifications
You must be signed in to change notification settings - Fork 928
Unable to Proxy Firebase Url #116
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
Comments
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight. |
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information. |
@jshcrowthe thanks for adding the label. I thought I'd add a little more information now that I've explored around looking for more options. Since I continued to look around and stumbled upon this post, Turns out the issue with the |
@therynamo if you set up something like DNSmasq (or just modify your /etc/hosts) you have override a subdomain to a local proxy. That way test-db.mylaptop.local will work and the SDK will parse the database name as test-db. You could also use this to override a database url (foo.firebaseio.com) to another IP. The database internals require that we need to parse the subdomain. What CI environment do you have that doesn't let you write an etc/hosts file? |
I don't know that I see an issue with allowing localhost URLs. I would defer to @schmidt-sebastian for a final say on that, but I think this could be a great PR for someone to take on. |
I also want more flexibility in proxying Firebase by domain name to avoid China's block on Firebase traffic. |
This was submitted in a PR and should be fixed. LMK if there are any other issues! |
Stellar! Thanks @jshcrowthe! 👍 |
Also changes idb manager functions to get the key from the app config.
[REQUIRED] Step 2: Describe your environment
database
[REQUIRED] Step 3: Describe the problem
When attempting to use
firebase-admin
sinitializeApp
function, the URL is strictly enforced. I'm sure this is intended, however it is keeping me from proxying the firebase URL to a local server for testing. Example:Resulting in the following error:
I use mockyeah for integration testing, which is a nice solution for being able to record snapshots for outgoing requests and their responses. The only caveat is that in order to record the response you have to proxy the URL so that the server can make the call itself.
The issue isn't necessarily with implementation on either side. My overall question is, would supporting a proxied URL be feasible?
Steps to reproduce:
Listed above.
Relevant Code:
Listed above.
Related Issue From
firebase-admin
.The text was updated successfully, but these errors were encountered: