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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper