I’m building a site where I fetch data on the frontend with my netlify function, which fetches data from an external api. It works flawlessly when in dev, or even dev --live mode. If I deploy to production the destination of my request from my netlify function to the external API gets changed during the request somehow. The request url changes from profile/user1 to /login on production but stays the same in dev mode and gives me the data from profile/user1.
I’m using axios for the requests (fetch didn’t work aswell). I’ve tried changing the request headers, allowing credentials etc. but nothing helped unfortunately.
What could be the reason for this strange redirect?
Thank you very much!