I have currently deployed Nextjs14 through Amplify. The backend is deployed in EC2 and is linked to the public zone of the custom vpc. They are using the same domain. api.example.com (backend), www.example.com (front)
That’s where the problem came from.
I’m currently testing, so I’ve only allowed the IP of my house in EC2’s inbound rules.
However, strangely, the API request works normally in the service deployed to Amplify.
Why is it working?
Please help anyone!
I’m currently testing, so I’ve only allowed the IP of my house in EC2’s inbound rules.
C TP is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2