问题
My computer is behind a corporate proxy. While visiting a website which is using Firebase Firestore, it is not connecting to the firebase servers. I am getting the below error in console.
[2018-09-21T10:09:15.854Z] @firebase/firestore: Firestore (5.4.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
How to work with Firestore web behind proxy?
Note: If the system is not behind proxy, same code is working fine. So no issues with the code, but how to setup proxy info in firestore?
回答1:
Depending on which framework you are using Firestore will access a number of domains under googleapis.com
over port 443.
If you're proxy is inspecting https traffic then you will most likely have to whitelist https://*.googleapis.com/
.
来源:https://stackoverflow.com/questions/52441650/firebase-firestore-web-not-working-behind-corporate-proxy