Recommended way to tell that a request comes from within the VPC (private networking) vs outside
efstajas
PROOP

a year ago

I'm implementing some rate limiting for a service that I don't want to enforce for requests made from my other services via private networking, but do want to apply to any traffic coming in from the outside world. What's the best way to tell when a request originated from within the private network, without requiring anything additional on the requesting service's side?

Solved

3 Replies

a year ago

You can check for proxy specific headers?

Check for headers such as X-Request-Start or X-Railway-Request-Id

These headers will only be present on public requests and will not ever exist on requests that originate from within the private network, they also could never be maliciously removed from public requests by a user because we explicitly set them on our proxy layer.


efstajas
PROOP

a year ago

awesome. that'll do it. thanks ✌️


a year ago

!s


Status changed to Solved brody about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...