Using Rack::Proxy to serve multiple React Apps on the same domain. – Josh Software

Now while calling API from any React app we need to send the token with it. Since the token is stored in local storage by Auth App which is using a different port so the local storage will not be accessible for other react apps.You may think “Why didn’t you go with Cookies”, Yes cookies are shareable among HTTP ports but its size is very less which is 4 KB. So if you have to store permissions and anything else which is shareable and exceeding to 4 KB the cookies will not be useful.
Using Rack::Proxy to serve multiple React Apps on the same domain. – Josh Software #ruby #rubydeveloper #rubyonrails #react https://www.rubyonrails.ba/single/using-rack-proxy-to-serve-multiple-react-apps-on-the-same-domain-josh-software

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles