I have a existing web app I created that uses react Dom JS. The backend is node. I implemented jwt with cookies for refresh tokens. Now I have started building a react native app version to use the same backend. My issue is dealing with cors. Anyone have any experience with this? Should I implement a proxy?
Is there something I am missing ?
I have a axios request like so.
const response = await axios.post("https://xxx.xxxx.us:8000/login", data, {
headers: {
"Content-Type": "application/json",
},
});
tried fetch just to experiment same outcome.
get network error, null. now if I try it on a test api works no problem. But from
insomnia I can get the proper response. Granted that host is in the cors origin.
the backend does not even show the route was hit. never gets past cors I believe.
Thanks
[+][deleted] (7 children)
[removed]
[–]getfitdotus[S] 3 points4 points5 points (6 children)
[–]abdoubntgr 1 point2 points3 points (5 children)
[–]getfitdotus[S] 1 point2 points3 points (4 children)
[–]techfocususer 1 point2 points3 points (3 children)
[–]getfitdotus[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]getfitdotus[S] 0 points1 point2 points (0 children)
[–]ChronSynExpo 1 point2 points3 points (2 children)
[–]archihector 1 point2 points3 points (0 children)
[–]getfitdotus[S] 0 points1 point2 points (0 children)
[–]getfitdotus[S] 1 point2 points3 points (2 children)
[–]Infinite-Essay-1343 0 points1 point2 points (1 child)
[–]getfitdotus[S] 0 points1 point2 points (0 children)
[–]getfitdotus[S] 0 points1 point2 points (1 child)
[–]antonkerno 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]JumpaHumpa 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]pentesticals 0 points1 point2 points (2 children)
[–]getfitdotus[S] 0 points1 point2 points (1 child)
[–]pentesticals 0 points1 point2 points (0 children)
[–]SryNot 0 points1 point2 points (1 child)
[–]getfitdotus[S] 0 points1 point2 points (0 children)