Closed
Description
[REQUIRED] Step 2: Describe your environment
- Operating System version: macOs Sierra 10.12.5
- Firebase SDK version: shouldn't make much of a difference in this issue
- Library version: ^5.1.0
- Firebase Product:
database
[REQUIRED] Step 3: Describe the problem
When attempting to use firebase-admin
s initializeApp
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:
firebase.initializeApp({
credential: firebase.credential.cert(FIREBASE_CREDENTIALS),
databaseURL: 'http://localhost:4001/https://my.firebaseio.com'
});
Resulting in the following error:
Error: FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com
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.