2

I am running both the react app on 0.0.0.0:5000 and expressjs api server on 0.0.0.0:3000 .i.e. instead of accessing them via localhost I am using my machines ip on home network which is

192.168.0.7:5000 (for react app) 192.168.0.7:3000 (for api server)

I have to test this on different devices connected to my home wifi. However the app is unable to allow set cookie

this set cookie was blocked because its domain attribute was invalid with regards to the current host url

as per suggestions over net added proxy to package.json of react app

enter image description here

and in changed cookie domain in api server setting to 192.168.0.7:5000 (address for react app)

below is the screenshot of the network request in chrome

enter image description here

enter image description here

Udit Bhardwaj
  • 1,761
  • 1
  • 19
  • 29

0 Answers0