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'm trying to figure out the way the isomorphic fetcher is implemented and I've run into some confusion about globals. api port and host are loaded from the .env file, they are used as globals in fetcher.js. Where and how do they transition from env variables on process.env to UR globals?
The text was updated successfully, but these errors were encountered:
API_HOST = server-api.com
Current server for rendering react in server side = server.com
server.com proxies requests to server-api.com using express-jwt-proxy,
But when server.com express instance makes api request(for server side rendering ) to server-api.com, in current implementation, if it calls server-api.com directly using superagent, wont it create a conflict? Because client is logged in , has a session cookie, but server implementation of fetcher doesnt send token by checking for the cookie in the request?
APIClient implementation in react universal hot package solved this by setting server req to the APIClient constructor on server side, though that forces the use of middleware to be initallized with api client created with req constructor initially, but it solves this problem ..
I'm trying to figure out the way the isomorphic fetcher is implemented and I've run into some confusion about globals. api port and host are loaded from the .env file, they are used as globals in fetcher.js. Where and how do they transition from env variables on process.env to UR globals?
The text was updated successfully, but these errors were encountered: