Rewrite rules that target internal URLs

Hi,

I have a static site (React) that has an /api route which I’m rerouting to a web service.

When I use the external URL of the web service in the Rewrite rule for the static site, it works as expected.

However, if I use the internal domain, either with or without an http:// prefix, it fails with a 502.

Is this expected? Is there a way to use the internal URL of a web service in a static site’s rewrite rules? I assume using the public URL increases latency. I’m already measuring that Render’s latency is a fair bit worse than an EC2 behind an ALB (the setup I’m migrating from), which is worth it for Render’s benefits, but is frustrating nonetheless.

Hi Kurt,

For static site redirects/rewrites the destination must be a path or a fully publicly accessible URL outlined in our rule syntax. Unfortunately, right now there is no way to use the internal address of the service. Feel free to submit that to feedback.render.com so we can prioritize it and you can be notified of updates.

Hi @tyler,

This is related to what I am looking into - but am I correct in assuming that using internal Internal Address of a web service from a static site is not possible at the moment? I am considering migrating completely to Render, but I need to keep API private while client would be using internal address to make requests