Next.js Discord

Discord Forum

Troubleshooting getServerSideProps Issue: Axios Requests Failing in Dockerized Frontend

Unanswered
West African Lion posted this in #help-forum
Open in Discord
Avatar
West African LionOP
Hello, I'm encountering an issue with getServerSideProps within a Dockerized frontend image of my application. In my index.tsx page, I'm utilizing the Axios library to make a request to my backend API within the getServerSideProps function. However, this request isn't reaching the backend.

Surprisingly, when I make the same API call to the backend using Postman, it works perfectly fine. Both the endpoint and the API URL are identical in both cases. I'm currently unable to pinpoint the cause of this issue. Any insights or suggestions to resolve this would be greatly appreciated.
Image
Image
Image

1 Reply

Avatar
West African LionOP
The last image are the console logs that I have in the serversideProps