Restrict API enpoints to run from specific domain/ip only
Options
![Mohamed](https://us.v-cdn.net/6037124/user_avatars/4081806.jpg)
Mohamed
Member ✭
Hello,
Is it possible to only allow the use of an endpoint from a specific domain or ip-adres. maybe with the help of functions?
thank you
Is it possible to only allow the use of an endpoint from a specific domain or ip-adres. maybe with the help of functions?
thank you
Comments
-
Yes! You have access to a variable called $remote_ip (https://docs.xano.com/working-with-data/variables#remote_ip) and you can make decisions based on whether this IP is in your whitelist or what have you.
-
Thank you Ray!
-
Are there other options ? It would be nice if it can be done on base of the origin domain. Based on remote IP's has limitations.
-
Hey. @Janlen. If you look further down the documentation, you find what you are probably looking for:
"$request_uri
This is a special environment variable that contains the URI that is being accessed from the API.
$request_querystri..."
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback