Call to netlify function with port 443 in url leads to redirect response

Hello,

I have an issue with my netlify function confirmPayment on my https://concavegrinder.netlify.app/ website.

When the function is called it is always called as https://concavegrinder.netlify.app:443/.netlify
with the port in the url, I can’t control the way it is called since it’s a foreign service.

This service awaits a confirmation response from the function and it tells me that the response it gets is Redirecting to https://www.concavegrinder.com/.netlify/functions/confirmPayment is there any way to avoid this redirects ? Maybe with another request method ? Right now it is called as a POST how can I prevent the service from getting this redirects as a response ?

hi there, before we dig in, did you see this brand new guide on debugging redirects?

I strongly suggest you give it a thorough read through and see if this fixes your problem:

if not, please post again, and we’ll try and troubleshoot.

Hello, thanks a lot for your response I indeed read this guide on another project, I tried adding a redirect myself on this website to see if I could fix the problem but it didn’t work.

My issue is that the url:port request redirects to url without port before responding and that the service which is calling this url that way catches the redirect as a wrong response.

If your remote service insists on calling us in that weird way, with the port number, I suppose you can insist that they handle the 301 redirect we return.

The better solution would of course be to have them change to calling us without the port number, though it sounds like their service is not flexible enough to do this, so hopefully they can add support for the very standard 301 redirect instead :slight_smile: