How can i hide Rest API response from URL visitors ?

[ad_1]

I am working on a test project. I am using ReactJS for frontend and wordpress for backend like headless cms. I am making API calls through ReactJS and it is working fine. The only thing I need is to hide JSON response from anyone who try to put/hit the API URL in browser. If I restrict rest API it will not allow my ReactJS calls to hit the URL.

Can someone tell me how to hide the JSON response when any visitor try URL in browser. In simple I just want to hide the JSON response.

[ad_2]
3 Comments
  1. You could restrict the entire backend site by IP address? That way only your front end has access to the rest API.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer