I created a node js app with an express server, after that, I dockerize it and deployed it on AWS ECS, one EC2 instance is also running with good health and in the security group, all traffic is allowed in inbound rules. I have one issue I am sending requests from the frontend to the backend only the GET request works but when I am trying a POST request it didn't work. Below is a screenshot of the Axios error I got when I POST the request -:
I also added a CORS header in the node js backend app -:
Where is the issue can someone guide me? Thanks
CodePudding user response:
This doesn’t look like EC2 issue but mostly your code.
Please have a look at this: Axios sending network error while status is 200 ok