Proxying API through Netlify's CDN

Hello, so I am currently trying to use a JAMSTACK on my site and I’ve got some problems.
I will try to explain it as much as I can.

So I host a REST API on a 3rd party server and I would like to proxy that REST API through the netlify’s CDN.

I read this Rewrites and proxies | Netlify Docs and I tried to add

/example/* http://IP:PORT/api/something:splat 200

I put it into _redirects, but when I use a Postman to check if is example.mywebsitename.netlify.com working, I get a “Not found” message.

Also this.image

Is it a big problem that I don’t use HTTPS on my REST API server when I want to proxy it through netlify?

Do I understand it correctly?

Thanks in advance

Hi, @Ahmed_Nakadi, and welcome to the Netlify community site. :+1:

I think I see a possible issue based on the rule posted above. You cannot set a port in a redirect. We will only redirect to port 80 for HTTP and to port 443 for HTTPS requests.

Are you trying to redirect to a different TCP port? If so, that isn’t possible at Netlify.

We’d be happy to enter a feature request for this if you are interested though. If there are other questions about this also, please let us know.

Hello Luke, yes it would be awesome if you would ever add that feature. I’m slowly getting in love with JAMSTACK and this would help me a lot. And I think that I am not the only one.

But if you guys have any other idea how to host a REST API on your own VPS server or on herokuapp and proxy it through the netlify’s CDN ( i hope i understand it correctly ), then hit me up please

great, we will file a feature request, and if we have any other bright ideas we’ll let you know.