It's not possible to restrict IP addresses to access a given route.
You can block IPs at the environment level with the HTTP Access Control and provide either:
- a list of IP addresses
- a username and password for basic authentication
Note that this will affect requests for all routes.
It is also possible to have either a CDN or your app block a specific IP on a given route for you, since the IP address of the original requester will be passed to your app through via theX-Forwarded-For
request header, and the route that was matched by the router will be shown in theX-Original-Route
request header.