You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the firestore js sdk in my web app, and faced a problem: some of my users are behind a firewall that blocks firebase urls (https://firebase.googleapis.com/, https://firestore.googleapis.com/, etc ) that the sdk talks to.
I plan to solve it by adding a service worker to intercept all requests to these urls, and forward them to my own server, which will then pass the requests to the firebase urls, then pass back the responses.
I imagine it could work, but I'm not sure if onSnapshot listeners will work too. I don't know the mechanism of the onSnapshot listeners, but I imagine WebSockets or gRPC are involved, but when I look at the devTools, I didn't see any WebSockets or gRPC traffic when I trigger the listener.
In any case, I want to know if my service worker + reverse proxy approach would work. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use the firestore js sdk in my web app, and faced a problem: some of my users are behind a firewall that blocks firebase urls (
https://firebase.googleapis.com/
,https://firestore.googleapis.com/
, etc ) that the sdk talks to.I plan to solve it by adding a service worker to intercept all requests to these urls, and forward them to my own server, which will then pass the requests to the firebase urls, then pass back the responses.
I imagine it could work, but I'm not sure if onSnapshot listeners will work too. I don't know the mechanism of the onSnapshot listeners, but I imagine WebSockets or gRPC are involved, but when I look at the devTools, I didn't see any WebSockets or gRPC traffic when I trigger the listener.
In any case, I want to know if my service worker + reverse proxy approach would work. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions