reactjsnginxamazon-ec2godaddy-api

How to disable memory routing for my react app routed through goDaddy deployed using nginx on AWS EC2 instance?


I am not using Memory Router in react. All of my routing is using BrowserRouter. When the app is deployed on the AWS EC2 instance and its behaviour is checked through its IP address, I see the complete url when traversing through the react app. Same behaviour is required after mapping my DNS domain to my IP address, but when I do that, we have memory routing such that url does not change when traversing through my react app. Nginx configuration looks something like this.

upstream react{
    server react-frontend:3000;
}


server {
   listen 80;
   server_name subdomain.domain.com;


location / {
    proxy_pass http://react;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_redirect off;
}

}

The solution should have something to do with disabling memory routing within GoDaddy. Its just that I cant seem to find the relevant resources for this particular issue.


Solution

  • Turns out it was indeed an issue with GoDaddy. We switched to Amazon Route 53 and the issue resolved itself.