Forward Real-Ip when Rewrite URL's

We need to get the real ip when proxying requests over render.com
Other providers (Vercel, Netlify,…) are all setting a header called x-real-ip or x-forwarded-for in the proxied request.

I would love to see this as well!

Thank you :slight_smile:

Hey Tobias,

Our proxy sets the IP on the x-forwarded-for header for rewrite requests. You should be able to find it there.

I just set to proxy a request to webhook.site and it shows all headers.
Take a look here:
https://webhook.site/#!/e7592e33-cd2f-4e2c-b02c-dd68a1692484/93625f71-aad4-4c61-8f56-97e71ada5d89/1

x-forwarded-server is set but no x-forwarded-for

Can you check this? Thanks!

Upon further investigation, I’ve realized there is a caveat I failed to mention. It looks like your domain has an A record pointed to our Anycast IP. The IP info is not currently forwarded when using the Anycast proxy. We have an open issue to support this use case.

As a potential workaround, you can set up a redirect form yourdomain.com to www.yourdomain.com. The www subdomain can then have a CNAME record pointed to your onrender domain. This avoids using the Anycast proxy and you should see the forwarded IP information in the rewritten request.